a few more changes on the avatars Velocity/TargetVelocity/SetMomentum. Need talk with Robert before last changes bc of bullet
parent
d0ae8bb86a
commit
07893ec3e7
|
@ -781,6 +781,34 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// requested Velocity for physics engines avatar motors
|
||||||
|
// only makes sense if there is a physical rep
|
||||||
|
public Vector3 TargetVelocity
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
if (PhysicsActor != null)
|
||||||
|
return PhysicsActor.TargetVelocity;
|
||||||
|
else
|
||||||
|
return Vector3.Zero;
|
||||||
|
}
|
||||||
|
|
||||||
|
set
|
||||||
|
{
|
||||||
|
if (PhysicsActor != null)
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
PhysicsActor.TargetVelocity = value;
|
||||||
|
}
|
||||||
|
catch (Exception e)
|
||||||
|
{
|
||||||
|
m_log.Error("[SCENE PRESENCE]: TARGETVELOCITY " + e.Message);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
private Quaternion m_bodyRot = Quaternion.Identity;
|
private Quaternion m_bodyRot = Quaternion.Identity;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
@ -3649,7 +3677,7 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
m_forceToApplyValid = true;
|
m_forceToApplyValid = true;
|
||||||
}
|
}
|
||||||
*/
|
*/
|
||||||
Velocity = direc;
|
TargetVelocity = direc;
|
||||||
Animator.UpdateMovementAnimations();
|
Animator.UpdateMovementAnimations();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue