From 53b23a9adccbef9951ba9b9422d18dc6ce59227c Mon Sep 17 00:00:00 2001 From: dahlia Date: Sat, 7 Feb 2015 22:52:12 -0800 Subject: Somewhat naive implementation of RotationalVelocity setter for ODE. Enables llSetRotationalVelocity(), llTargetOmega(), llLookAt(), and probably a few more LSL features for physical objects in ODE. --- OpenSim/Region/Physics/OdePlugin/ODEPrim.cs | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/OpenSim/Region/Physics/OdePlugin/ODEPrim.cs b/OpenSim/Region/Physics/OdePlugin/ODEPrim.cs index f5a25d6..f934b8a 100644 --- a/OpenSim/Region/Physics/OdePlugin/ODEPrim.cs +++ b/OpenSim/Region/Physics/OdePlugin/ODEPrim.cs @@ -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); + } + } + /// /// Stop a prim from being subject to physics. /// @@ -2645,6 +2653,7 @@ Console.WriteLine(" JointCreateFixed"); if (value.IsFinite()) { m_rotationalVelocity = value; + setAngularVelocity(value.X, value.Y, value.Z); } else { -- cgit v1.1