IrrNewton: movement of physical objects

If you are a new Irrlicht Engine user, and have a newbie-question, this is the forum for you. You may also post general programming questions here.
Post Reply
DimonSE
Posts: 6
Joined: Tue Dec 06, 2011 3:46 pm

IrrNewton: movement of physical objects

Post by DimonSE »

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?
randomMesh
Posts: 1186
Joined: Fri Dec 29, 2006 12:04 am

Re: IrrNewton: movement of physical objects

Post by randomMesh »

"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.
"Whoops..."
nespa
Posts: 167
Joined: Wed Feb 24, 2010 12:02 pm

Re: IrrNewton: movement of physical objects

Post by nespa »

Try with joint kinematic controller.
Post Reply