Move Mesh

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
Robomaniac
Posts: 602
Joined: Sat Aug 23, 2003 2:03 am
Location: Pottstown, PA
Contact:

Move Mesh

Post by Robomaniac »

How can you move a mesh from a position. For example i have a mesh on the ui screen and i don't want it in the middle. Thanks.

~~The Robomaniac
saigumi
Posts: 921
Joined: Fri Aug 22, 2003 11:31 am
Location: St. Louis, MO USA
Contact:

Post by saigumi »

Two ways:

You can move the mesh position when you first assign it to a scenenode.

Code: Select all

MySceneNode = smgr->addMeshSceneNode(lbMesh->getMesh(0),0,-1,irr::core::vector3df(10.f,0.0f,20.0f));
Or you can move the SceneNode at any time

Code: Select all

MySceneNode->setRelativePosition(irr::core::vector3df(10.0f,0.0f,20.0f));
Crud, how do I do this again?
Post Reply