BulletSim: Send out avatar position update if velocity is now zero
and it wasn't zero last tick. This will prevent some avatar creeping. Adjust BulletSim default avatar velocity zeroing so the avatar stops sooner.LSLKeyTest
parent
57b6398b71
commit
feb058f5c5
|
@ -3571,6 +3571,9 @@ namespace OpenSim.Region.Framework.Scenes
|
|||
!Rotation.ApproxEquals(m_lastRotation, ROTATION_TOLERANCE)
|
||||
|| !Velocity.ApproxEquals(m_lastVelocity, VELOCITY_TOLERANCE)
|
||||
|| !m_pos.ApproxEquals(m_lastPosition, POSITION_LARGETOLERANCE)
|
||||
// if velocity is zero and it wasn't zero last time, send the update
|
||||
|| (Velocity == Vector3.Zero && m_lastVelocity != Vector3.Zero)
|
||||
// if position has moved just a little and velocity is very low, send the update
|
||||
|| (!m_pos.ApproxEquals(m_lastPosition, POSITION_SMALLTOLERANCE) && Velocity.LengthSquared() < LOWVELOCITYSQ )
|
||||
) )
|
||||
{
|
||||
|
|
|
@ -633,7 +633,7 @@ public static class BSParam
|
|||
new ParameterDefn<float>("AvatarAddForcePushFactor", "BSCharacter.AddForce is multiplied by this and mass to be like other physics engines",
|
||||
0.315f ),
|
||||
new ParameterDefn<float>("AvatarStopZeroThreshold", "Movement velocity below which avatar is assumed to be stopped",
|
||||
0.4f,
|
||||
0.45f,
|
||||
(s) => { return (float)AvatarStopZeroThreshold; },
|
||||
(s,v) => { AvatarStopZeroThreshold = v; AvatarStopZeroThresholdSquared = v * v; } ),
|
||||
new ParameterDefn<float>("AvatarBelowGroundUpCorrectionMeters", "Meters to move avatar up if it seems to be below ground",
|
||||
|
|
Loading…
Reference in New Issue