l5games
05-03-2008 21:21:31
How should I move the body and the sceneNode?
I am under the assumption that translating the Body->getNode() will update the body in the simulation and the world.
Will the following move the body and the node?
If I use the above code, the mesh moves around, but will not collide with anything.
I have been working with Ogre for a while now and had a fully running demo with it, but I wanted to add Physics and it just doesn't seem to be as straight forward as I thought it would be.
I am at an inpass. If someone has some code they wouldn't mind sharing, that would be awesome. I learn best by reading others code.
Any information, code snippets, etc... would be greatly appreciated.
Thanks,
I am under the assumption that translating the Body->getNode() will update the body in the simulation and the world.
Will the following move the body and the node?
Body->getNode()->translate(body->getNode()->getOrientation() * Vector3(0, 0, 1) * timePassed))
If I use the above code, the mesh moves around, but will not collide with anything.
I have been working with Ogre for a while now and had a fully running demo with it, but I wanted to add Physics and it just doesn't seem to be as straight forward as I thought it would be.
I am at an inpass. If someone has some code they wouldn't mind sharing, that would be awesome. I learn best by reading others code.
Any information, code snippets, etc... would be greatly appreciated.
Thanks,