rotate a rigid body

A place to discuss everything related to Newton Dynamics.

Moderators: Sascha Willems, walaber

rotate a rigid body

Postby anand.rp » Fri Nov 05, 2010 7:26 am

How to rotate a 3d rigid body?
Apply torque to it?

I m using c# wrapper of Newton

I m using wpf for rendering
anand.rp
 

Re: rotate a rigid body

Postby ledahut » Sat Nov 06, 2010 6:16 pm

Using NewtonBodySetMatrix to rotate a body will work.
BUT if you want a reel physic approach, call NewtonBodySetOmega in callback.
Because NewtonBodySetMatrix is like teleportation, and bodies could go trought each other and result in explosion for newton engine.
ledahut
 
Posts: 98
Joined: Mon Jun 21, 2010 8:03 am
Location: France

Re: rotate a rigid body

Postby ledahut » Mon Nov 08, 2010 4:00 am

Thank you Berserkguard, you right. I updated the wiki.


How to rotate a 3d rigid body?
Apply torque to it?

Use NewtonBodySetTorque NewtonBodyAddTorque or NewtonBodySetOmega for dynamic body.

But If you juste want to rotate once for all your body (static or dynamic) at a specific angle, use NewtonBodySetMatrix.
ledahut
 
Posts: 98
Joined: Mon Jun 21, 2010 8:03 am
Location: France


Return to General Discussion

Who is online

Users browsing this forum: No registered users and 1 guest