aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Physics/Manager/PhysicsActor.cs
diff options
context:
space:
mode:
authorRobert Adams2012-12-13 16:31:28 -0800
committerRobert Adams2012-12-13 16:32:25 -0800
commit469c6c000a85dafc3704b2ff053949e8588506f8 (patch)
treef9c97536150ec5091603d345226562bfd2e31c60 /OpenSim/Region/Physics/Manager/PhysicsActor.cs
parentBulletSim: fix problem with continuious rebuilding of physical linksets. This... (diff)
downloadopensim-SC_OLD-469c6c000a85dafc3704b2ff053949e8588506f8.zip
opensim-SC_OLD-469c6c000a85dafc3704b2ff053949e8588506f8.tar.gz
opensim-SC_OLD-469c6c000a85dafc3704b2ff053949e8588506f8.tar.bz2
opensim-SC_OLD-469c6c000a85dafc3704b2ff053949e8588506f8.tar.xz
Return the last set targetVelocity rather than the current velocity as the default action made available in PhysicsActor.TargetVelocity. Doesn't change any physics operation but makes DSG work better as the targetVelocity value does not keep moving around.
Diffstat (limited to 'OpenSim/Region/Physics/Manager/PhysicsActor.cs')
-rw-r--r--OpenSim/Region/Physics/Manager/PhysicsActor.cs13
1 files changed, 8 insertions, 5 deletions
diff --git a/OpenSim/Region/Physics/Manager/PhysicsActor.cs b/OpenSim/Region/Physics/Manager/PhysicsActor.cs
index 34413e5..d119791 100644
--- a/OpenSim/Region/Physics/Manager/PhysicsActor.cs
+++ b/OpenSim/Region/Physics/Manager/PhysicsActor.cs
@@ -250,17 +250,20 @@ namespace OpenSim.Region.Physics.Manager
250 public abstract Vector3 CenterOfMass { get; } 250 public abstract Vector3 CenterOfMass { get; }
251 251
252 /// <summary> 252 /// <summary>
253 /// Velocity of this actor. 253 /// The desired velocity of this actor.
254 /// </summary> 254 /// </summary>
255 /// <remarks> 255 /// <remarks>
256 /// Setting this provides a target velocity for physics scene updates. 256 /// Setting this provides a target velocity for physics scene updates.
257 /// Getting this returns the velocity calculated by physics scene updates, using factors such as target velocity, 257 /// Getting this returns the last set target. Fetch Velocity to get the current velocity.
258 /// time to accelerate and collisions.
259 /// </remarks> 258 /// </remarks>
259 protected Vector3 m_targetVelocity;
260 public virtual Vector3 TargetVelocity 260 public virtual Vector3 TargetVelocity
261 { 261 {
262 get { return Velocity; } 262 get { return m_targetVelocity; }
263 set { Velocity = value; } 263 set {
264 m_targetVelocity = value;
265 Velocity = m_targetVelocity;
266 }
264 } 267 }
265 268
266 public abstract Vector3 Velocity { get; set; } 269 public abstract Vector3 Velocity { get; set; }