At the moment I'm having to limit the velocity of each entity manually:
Code: Select all
public static void SetLength(ref Vector3 v, float length)
{
v.Normalize();
v *= length;
}
Code: Select all
public static void SetLength(ref Vector3 v, float length)
{
v.Normalize();
v *= length;
}
That's pretty much all an internal system would do (though if you want a limit, it would only correct it if over the maximum velocity, and it needs to protect against zero velocity NaN's). If you want more robustness in the face of interfering forces, you could use the (slower) Maximum(Linear/Angular)VelocityConstraint.Is there a property that I can set to limit the velocities in BEPU?
At the moment I'm having to limit the velocity of each entity manually:
I could always use LengthSquared and put the sign back in afterwards; saves a square root calculation.though if you want a limit, it would only correct it if over the maximum velocity, and it needs to protect against zero velocity NaN's