[need an advice] How to set the position of a mesh
-
- Posts: 12
- Joined: Fri May 18, 2007 3:06 pm
- Location: Panketal, Germany
[need an advice] How to set the position of a mesh
Hi,
I've a problem with changing the position of meshes. In the tutorials there's allways used ''SetPosition()''.
But when i modify some parameters of that function, nothing changes.(?)
Is that the right function? Or is there another way to set the position of a mesh?
Thank you for answers and advices.
I've a problem with changing the position of meshes. In the tutorials there's allways used ''SetPosition()''.
But when i modify some parameters of that function, nothing changes.(?)
Is that the right function? Or is there another way to set the position of a mesh?
Thank you for answers and advices.
-
- Posts: 26
- Joined: Thu Apr 26, 2007 6:57 am
make ur scenenode first. ex:
Code: Select all
ISceneNode* wutevernode = loading ur mesh;
wutevernode->getposition(core::vector3df(0.0f,0.0f,0.0f); //vector3df(x,y,z)
-
- Posts: 12
- Joined: Fri May 18, 2007 3:06 pm
- Location: Panketal, Germany
-
- Posts: 12
- Joined: Fri May 18, 2007 3:06 pm
- Location: Panketal, Germany
-
- Posts: 12
- Joined: Fri May 18, 2007 3:06 pm
- Location: Panketal, Germany
I've made the code like this:
But even if i modify the 'setPosition'-Values to 1000,1000,1000 the mesh stays there where it is now.(?)
Code: Select all
scene::IAnimatedMesh* mesh = smgr->getMesh(
"../../media/beast.x");
scene::IAnimatedMeshSceneNode* anode = 0;
anode = smgr->addAnimatedMeshSceneNode(mesh);
anode->setPosition(core::vector3df(0,0,0));
anode->setAnimationSpeed(20);
anode->setScale(core::vector3df(100,100,100));
anode->setMaterialFlag(video::EMF_NORMALIZE_NORMALS,true);
-
- Posts: 12
- Joined: Fri May 18, 2007 3:06 pm
- Location: Panketal, Germany