How to group meshes

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
nicknitro
Posts: 5
Joined: Sun May 13, 2007 10:42 am
Location: Vienna - AT
Contact:

How to group meshes

Post by nicknitro »

I was looking for a function in Irricht to group some objects and move them relativ to their parent or container

Thank you for your help
greenya
Posts: 1012
Joined: Sun Jan 21, 2007 1:46 pm
Location: Ukraine
Contact:

Re: How to group meshes

Post by greenya »

nicknitro wrote:I was looking for a function in Irricht to group some objects and move them relativ to their parent or container

Thank you for your help
You can choose 1 main node and assign this node as parent for all other (that are in the group). So you will need to move/rotate/scale only one (main) node -- all parent will be moved/rotated/scaled automatically.
olivehehe_03
Posts: 157
Joined: Tue Mar 20, 2007 8:30 am

Post by olivehehe_03 »

It's possible to parent one object to another, you can do it when you create the scene node like in the first line, or with the command in the second line.

Code: Select all

	//setting a parent when you create the scene node
	irr::scene::ISceneManager::addMeshSceneNode(irr::scene::IMesh *mesh, irr::scene::ISceneNode *parent)

	//setting the parent after the node is created
	irr::scene::ISceneNode::setParent(irr::scene::ISceneNode *newParent);
Just look them up in the documention for more info. Hope that helps
Tell me what you cherish most. Give me the pleasure of taking it away.
Post Reply