Zero Rotation in Newest Version

Discuss any questions about BEPUphysics or problems encountered.
Post Reply
lareusoular
Posts: 40
Joined: Mon Sep 06, 2010 9:22 pm

Zero Rotation in Newest Version

Post by lareusoular »

In the old 0.14 Build, I used the InverseInertia to Toolbox.ZeroMatrix to make the Entity not rotate....
BNow I have tried using InverseInertia = Matrix3X3.CreateFromMatrix(Toolbox.ZeroMatrix)... But it doesn't seem to work...
Is there any other way instead of setting the Entity Orientation every frame to Quaternion.Identity?
Norbo
Site Admin
Posts: 4929
Joined: Tue Jul 04, 2006 4:45 am

Re: Zero Rotation in Newest Version

Post by Norbo »

This should work:

Code: Select all

entity.LocalInertiaTensorInverse = new Matrix3X3();
lareusoular
Posts: 40
Joined: Mon Sep 06, 2010 9:22 pm

Re: Zero Rotation in Newest Version

Post by lareusoular »

Norbo wrote:This should work:

Code: Select all

entity.LocalInertiaTensorInverse = new Matrix3X3();
Didn't work as expected...
The only way to make my character not to fall here is by on every Update setting the Orientation to Quaternion.Identity :cry:

Thanks for the fast reply =)
Norbo
Site Admin
Posts: 4929
Joined: Tue Jul 04, 2006 4:45 am

Re: Zero Rotation in Newest Version

Post by Norbo »

Didn't work as expected...
Sounds like there's something else going on. Is it ever being switched to kinematic and back to dynamic later, or reinitialized to dynamic again? Reinitialization will cause it to recompute its inertia tensor, overwriting the inertia you set earlier.
Post Reply