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; }
|
public abstract Vector3 CenterOfMass { get; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Velocity of this actor.
|
/// The desired velocity of this actor.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <remarks>
|
/// <remarks>
|
||||||
/// Setting this provides a target velocity for physics scene updates.
|
/// 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,
|
/// Getting this returns the last set target. Fetch Velocity to get the current velocity.
|
||||||
/// time to accelerate and collisions.
|
|
||||||
/// </remarks>
|
/// </remarks>
|
||||||
|
protected Vector3 m_targetVelocity;
|
||||||
public virtual Vector3 TargetVelocity
|
public virtual Vector3 TargetVelocity
|
||||||
{
|
{
|
||||||
get { return Velocity; }
|
get { return m_targetVelocity; }
|
||||||
set { Velocity = value; }
|
set {
|
||||||
|
m_targetVelocity = value;
|
||||||
|
Velocity = m_targetVelocity;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public abstract Vector3 Velocity { get; set; }
|
public abstract Vector3 Velocity { get; set; }
|
||||||
|
|
Loading…
Reference in New Issue