aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Framework/Scenes/ScenePresence.cs
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/Framework/Scenes/ScenePresence.cs')
-rw-r--r--OpenSim/Region/Framework/Scenes/ScenePresence.cs30
1 files changed, 29 insertions, 1 deletions
diff --git a/OpenSim/Region/Framework/Scenes/ScenePresence.cs b/OpenSim/Region/Framework/Scenes/ScenePresence.cs
index 6f4d6c3..f96fb85 100644
--- a/OpenSim/Region/Framework/Scenes/ScenePresence.cs
+++ b/OpenSim/Region/Framework/Scenes/ScenePresence.cs
@@ -781,6 +781,34 @@ namespace OpenSim.Region.Framework.Scenes
781 } 781 }
782 } 782 }
783 783
784 // requested Velocity for physics engines avatar motors
785 // only makes sense if there is a physical rep
786 public Vector3 TargetVelocity
787 {
788 get
789 {
790 if (PhysicsActor != null)
791 return PhysicsActor.TargetVelocity;
792 else
793 return Vector3.Zero;
794 }
795
796 set
797 {
798 if (PhysicsActor != null)
799 {
800 try
801 {
802 PhysicsActor.TargetVelocity = value;
803 }
804 catch (Exception e)
805 {
806 m_log.Error("[SCENE PRESENCE]: TARGETVELOCITY " + e.Message);
807 }
808 }
809 }
810 }
811
784 private Quaternion m_bodyRot = Quaternion.Identity; 812 private Quaternion m_bodyRot = Quaternion.Identity;
785 813
786 /// <summary> 814 /// <summary>
@@ -3649,7 +3677,7 @@ namespace OpenSim.Region.Framework.Scenes
3649 m_forceToApplyValid = true; 3677 m_forceToApplyValid = true;
3650 } 3678 }
3651*/ 3679*/
3652 Velocity = direc; 3680 TargetVelocity = direc;
3653 Animator.UpdateMovementAnimations(); 3681 Animator.UpdateMovementAnimations();
3654 } 3682 }
3655 3683