Scene nodes maneuvering

If you are a new Irrlicht Engine user, and have a newbie-question, this is the forum for you. You may also post general programming questions here.
Post Reply
shaim
Posts: 26
Joined: Sun Dec 14, 2008 10:55 am

Scene nodes maneuvering

Post by shaim »

Hi

I would like to know if there is a way to make a connection between a set of scene nodes(cubes) to a specific main scene node(cube) so when the main scene node will change its positioning\rotation all the other scene nodes will change their own posisioning/rotation also relatively to its poisitioning/rotation state?

for example in case one would like to rotate a set of cubes around a center scene node cube(0,0) shall he build a radius and angle for each cube and then change the angle for all cubes to have a cubes rotation around the center point(0,0)?
Is there a better way to do it?

Thanks
CuteAlien
Admin
Posts: 9981
Joined: Mon Mar 06, 2006 2:25 pm
Location: Tübingen, Germany
Contact:

Post by CuteAlien »

You can set parent-child relationships. All childs are rotated, moved, scaled by their parents in addition to their own transformations.

Use either addChild or setParent to do that. See documentation: http://irrlicht.sourceforge.net/docu/cl ... _node.html
IRC: #irrlicht on irc.libera.chat
Code snippet repository: https://github.com/mzeilfelder/irr-playground-micha
Free racer made with Irrlicht: http://www.irrgheist.com/hcraftsource.htm
Post Reply