steph31
14-12-2008 12:58:38
Hello everyone !
I ‘ve got a problem concerning the movement of objects, the function ‘addForce' (or AddTorque) doesn’t work...
Code to create the object :
and the code for the movements of the created object:
The object displays without problem in the window (and so I don’t have any mistakes in compilation).
I’m using Ogre 1.6 et NxOgre 1.0.21
Thanks in advance for answering to me.
I ‘ve got a problem concerning the movement of objects, the function ‘addForce' (or AddTorque) doesn’t work...
Code to create the object :
World *mWorld = new World("log:html");
mScene =mWorld->createScene("Main","gravity: yes, floor: yes, renderer: ogre, rendererUserData: mSceneMgr");
mCube = mScene->createBody("tuto_cube", new Cube(Vector3(1.0f,1.0f,1.0f)), Vector3(0, 30, 0),"model: cube.1m.smooth.mesh", "mass: 10");
and the code for the movements of the created object:
if (mKeyboard->isKeyDown(OIS::KC_U) )mCube->addForce(Ogre::Vector3(0,20,0));
The object displays without problem in the window (and so I don’t have any mistakes in compilation).
I’m using Ogre 1.6 et NxOgre 1.0.21
Thanks in advance for answering to me.