Page 1 of 1

PARENTING OBJECTS...HOW?

Posted: Thu Sep 08, 2005 2:44 am
by Guest
HOW DO I PARENT OBJECTS TO THE CAMERA AND OTHER STUFF

Posted: Thu Sep 08, 2005 5:04 am
by CZestmyr
When you create a SceneNode, you specify the parent scene node in the constructor as the second parameter.

And there should also be some setParent functions or something like that in The ISceneNode interface. Just take a look into the reference manual, It's useful.

Posted: Thu Sep 08, 2005 5:31 am
by Guest
i found this but i dont under stand does anyone have a chunk of code?



virtual ISceneNode * getMS3DJointNode (const c8 *jointName)=0
IAnimatedMeshSceneNode (ISceneNode *parent, ISceneManager *mgr, s32 id, const core::vector3df &position=core::vector3df(0, 0, 0), const core::vector3df &rotation=core::vector3df(0, 0, 0), const core::vector3df &scale=core::vector3df(1.0f, 1.0f, 1.0f))
Constructor.

Posted: Thu Sep 08, 2005 8:16 am
by Jedive
All the methods which create a node (they are all in the ISceneManager class) have a "parent" parameter which you can use to set the parent of the new node.


If you want to change the parent of a node after creation, you have the ISceneNode::setParent() method.

Posted: Fri Sep 09, 2005 8:14 am
by Guest
ok how do you set its position?

Posted: Fri Sep 09, 2005 11:58 am
by Fred
Look in the API docs. We're not going to write your code for you.

Posted: Fri Sep 09, 2005 6:48 pm
by Guest
i know where do i look and im just trying to learn....

Posted: Fri Sep 09, 2005 7:35 pm
by Dances
On Irrlicht's site, theres both Tutorials and a whole API that contains everything you need to know. Not to mention the source code of the engine COMES with Irrlicht.

Posted: Tue Sep 13, 2005 2:04 am
by Midnight
creating nodes and elements in Irrlicht is simple you basicly use an add function for each node or element and insert it's paramiters accordingly common param's are parent, ID, and rectangle or 3d position for nodes.

the code you posted is what inherites these paramiters and creates the element or node.

Posted: Tue Sep 13, 2005 2:51 pm
by Guest
eh its simple, for a node just type
(node)->setParent(parentnode);
if u cant understand that i cant help u