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.
parent
31d3952477
commit
469c6c000a
|
@ -250,17 +250,20 @@ namespace OpenSim.Region.Physics.Manager
|
|||
public abstract Vector3 CenterOfMass { get; }
|
||||
|
||||
/// <summary>
|
||||
/// Velocity of this actor.
|
||||
/// The desired velocity of this actor.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Setting this provides a target velocity for physics scene updates.
|
||||
/// Getting this returns the velocity calculated by physics scene updates, using factors such as target velocity,
|
||||
/// time to accelerate and collisions.
|
||||
/// Getting this returns the last set target. Fetch Velocity to get the current velocity.
|
||||
/// </remarks>
|
||||
protected Vector3 m_targetVelocity;
|
||||
public virtual Vector3 TargetVelocity
|
||||
{
|
||||
get { return Velocity; }
|
||||
set { Velocity = value; }
|
||||
get { return m_targetVelocity; }
|
||||
set {
|
||||
m_targetVelocity = value;
|
||||
Velocity = m_targetVelocity;
|
||||
}
|
||||
}
|
||||
|
||||
public abstract Vector3 Velocity { get; set; }
|
||||
|
|
Loading…
Reference in New Issue