diff options
author | dahlia | 2015-02-07 22:52:12 -0800 |
---|---|---|
committer | dahlia | 2015-02-07 22:52:12 -0800 |
commit | 53b23a9adccbef9951ba9b9422d18dc6ce59227c (patch) | |
tree | 76beef210688ded0207e608b8be507c3b352dedc | |
parent | llLookAt() strength parameter should slow rotation as it is increased. Thanks... (diff) | |
download | opensim-SC_OLD-53b23a9adccbef9951ba9b9422d18dc6ce59227c.zip opensim-SC_OLD-53b23a9adccbef9951ba9b9422d18dc6ce59227c.tar.gz opensim-SC_OLD-53b23a9adccbef9951ba9b9422d18dc6ce59227c.tar.bz2 opensim-SC_OLD-53b23a9adccbef9951ba9b9422d18dc6ce59227c.tar.xz |
Somewhat naive implementation of RotationalVelocity setter for ODE. Enables llSetRotationalVelocity(), llTargetOmega(), llLookAt(), and probably a few more LSL features for physical objects in ODE.
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Region/Physics/OdePlugin/ODEPrim.cs | 9 |
1 files changed, 9 insertions, 0 deletions
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 | |||
785 | } | 785 | } |
786 | } | 786 | } |
787 | 787 | ||
788 | private void setAngularVelocity(float x, float y, float z) | ||
789 | { | ||
790 | if (Body != (IntPtr)0) | ||
791 | { | ||
792 | d.BodySetAngularVel(Body, x, y, z); | ||
793 | } | ||
794 | } | ||
795 | |||
788 | /// <summary> | 796 | /// <summary> |
789 | /// Stop a prim from being subject to physics. | 797 | /// Stop a prim from being subject to physics. |
790 | /// </summary> | 798 | /// </summary> |
@@ -2645,6 +2653,7 @@ Console.WriteLine(" JointCreateFixed"); | |||
2645 | if (value.IsFinite()) | 2653 | if (value.IsFinite()) |
2646 | { | 2654 | { |
2647 | m_rotationalVelocity = value; | 2655 | m_rotationalVelocity = value; |
2656 | setAngularVelocity(value.X, value.Y, value.Z); | ||
2648 | } | 2657 | } |
2649 | else | 2658 | else |
2650 | { | 2659 | { |