From ffe4d738fbcd27e3c037693ab6812df1d9fbb977 Mon Sep 17 00:00:00 2001 From: Dan Lake Date: Wed, 31 Oct 2012 17:13:18 -0700 Subject: [PATCH] Add TargetVelocity to PhysicsActor interface to support distributed physics. No change to existing functions. --- OpenSim/Region/Framework/Scenes/ScenePresence.cs | 2 +- OpenSim/Region/Physics/Manager/PhysicsActor.cs | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/OpenSim/Region/Framework/Scenes/ScenePresence.cs b/OpenSim/Region/Framework/Scenes/ScenePresence.cs index 71e322d432..5f2a6b14d6 100644 --- a/OpenSim/Region/Framework/Scenes/ScenePresence.cs +++ b/OpenSim/Region/Framework/Scenes/ScenePresence.cs @@ -523,7 +523,7 @@ namespace OpenSim.Region.Framework.Scenes { if (PhysicsActor != null) { - m_velocity = PhysicsActor.Velocity; + m_velocity = PhysicsActor.TargetVelocity; // m_log.DebugFormat( // "[SCENE PRESENCE]: Set velocity {0} for {1} in {2} via getting Velocity!", diff --git a/OpenSim/Region/Physics/Manager/PhysicsActor.cs b/OpenSim/Region/Physics/Manager/PhysicsActor.cs index 0587054c23..34413e5ec4 100644 --- a/OpenSim/Region/Physics/Manager/PhysicsActor.cs +++ b/OpenSim/Region/Physics/Manager/PhysicsActor.cs @@ -257,6 +257,12 @@ namespace OpenSim.Region.Physics.Manager /// Getting this returns the velocity calculated by physics scene updates, using factors such as target velocity, /// time to accelerate and collisions. /// + public virtual Vector3 TargetVelocity + { + get { return Velocity; } + set { Velocity = value; } + } + public abstract Vector3 Velocity { get; set; } public abstract Vector3 Torque { get; set; }