Somewhat naive implementation of RotationalVelocity setter for ODE. Enables llSetRotationalVelocity(), llTargetOmega(), llLookAt(), and probably a few more LSL features for physical objects in ODE.

inv-download
dahlia 2015-02-07 22:52:12 -08:00
parent 12119a9d7d
commit 53b23a9adc
1 changed files with 9 additions and 0 deletions

View File

@ -785,6 +785,14 @@ namespace OpenSim.Region.Physics.OdePlugin
} }
} }
private void setAngularVelocity(float x, float y, float z)
{
if (Body != (IntPtr)0)
{
d.BodySetAngularVel(Body, x, y, z);
}
}
/// <summary> /// <summary>
/// Stop a prim from being subject to physics. /// Stop a prim from being subject to physics.
/// </summary> /// </summary>
@ -2645,6 +2653,7 @@ Console.WriteLine(" JointCreateFixed");
if (value.IsFinite()) if (value.IsFinite())
{ {
m_rotationalVelocity = value; m_rotationalVelocity = value;
setAngularVelocity(value.X, value.Y, value.Z);
} }
else else
{ {