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?
IrrNewton: movement of physical objects
-
- Posts: 1186
- Joined: Fri Dec 29, 2006 12:04 am
Re: IrrNewton: movement of physical objects
"how hard do I push it to get it where it needs to be"
This is an ODE snippet, but i am sure it's easy to adapt to Newton.
And yes, setting the position manually is a bad idea, you should only apply forces, torques or impulses.
This is an ODE snippet, but i am sure it's easy to adapt to Newton.
And yes, setting the position manually is a bad idea, you should only apply forces, torques or impulses.
"Whoops..."
Re: IrrNewton: movement of physical objects
Try with joint kinematic controller.