IrrNewton: movement of physical objects
Posted: Wed Jul 11, 2012 8:30 am
Hi all!
I need help with IrrNewton (it's irrlicht wrapper for newton dynamic).
So, I write air-hockey game and use newton physic (just for get skills). In my code I have a plane, two mallets and air-hockey puck, and I need move mallet in some point on plane.
I've tried use newton::IBody->setPosition() but then we don't have reactions with another physics object (air-hockey puck for instance)
I've tried use newton::IBody->setForce() or newton::IBody->addImpulse() for move mallet, but then mallet run around cursor (as the earth around the sun) because I've recount force direction and power in the game loop.
So, any ideas, how just move mallet to some position on plane?
I need help with IrrNewton (it's irrlicht wrapper for newton dynamic).
So, I write air-hockey game and use newton physic (just for get skills). In my code I have a plane, two mallets and air-hockey puck, and I need move mallet in some point on plane.
I've tried use newton::IBody->setPosition() but then we don't have reactions with another physics object (air-hockey puck for instance)
I've tried use newton::IBody->setForce() or newton::IBody->addImpulse() for move mallet, but then mallet run around cursor (as the earth around the sun) because I've recount force direction and power in the game loop.
So, any ideas, how just move mallet to some position on plane?