V2 Constraits freeze axis question

Discuss any questions about BEPUphysics or problems encountered.
Post Reply
b1fg2
Posts: 16
Joined: Mon Sep 24, 2018 3:36 pm

V2 Constraits freeze axis question

Post by b1fg2 » Wed Feb 19, 2020 12:09 pm

how do i fixed the rotation or position for certain axis in bepu v2 like unity?

https://docs.unity3d.com/ScriptReferenc ... aints.html

Norbo
Site Admin
Posts: 4896
Joined: Tue Jul 04, 2006 4:45 am

Re: V2 Constraits freeze axis question

Post by Norbo » Wed Feb 19, 2020 9:46 pm

You can zero out a row of the body's inverse inertia tensor to lock rotation around a body's local axes. There is no equivalent body-intrinsic position lock; you can do similar things with constraints like the LinearAxisServo or, more approximately, just by setting the appropriate component of the position and velocity to 0 every frame.

Post Reply