aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorRobert Adams2013-09-20 09:23:12 -0700
committerJustin Clark-Casey (justincc)2013-09-26 20:09:16 +0100
commit2c856f2a60335dad8f695e0a110412f5df484d3b (patch)
tree97e6310131e3da80cdac2e972ea649d723a798d3
parentBulletSim: zero velocity when avatar not moving. (diff)
downloadopensim-SC_OLD-2c856f2a60335dad8f695e0a110412f5df484d3b.zip
opensim-SC_OLD-2c856f2a60335dad8f695e0a110412f5df484d3b.tar.gz
opensim-SC_OLD-2c856f2a60335dad8f695e0a110412f5df484d3b.tar.bz2
opensim-SC_OLD-2c856f2a60335dad8f695e0a110412f5df484d3b.tar.xz
BulletSim: reduce avatar walking stopped threshold.
Add parameter for setting the walking stopped threshold. This fixes the slight jump when an avatar stops walking.
-rwxr-xr-xOpenSim/Region/Physics/BulletSPlugin/BSActorAvatarMove.cs1
-rwxr-xr-xOpenSim/Region/Physics/BulletSPlugin/BSParam.cs3
2 files changed, 4 insertions, 0 deletions
diff --git a/OpenSim/Region/Physics/BulletSPlugin/BSActorAvatarMove.cs b/OpenSim/Region/Physics/BulletSPlugin/BSActorAvatarMove.cs
index 8ca55e5..1bcf879 100755
--- a/OpenSim/Region/Physics/BulletSPlugin/BSActorAvatarMove.cs
+++ b/OpenSim/Region/Physics/BulletSPlugin/BSActorAvatarMove.cs
@@ -128,6 +128,7 @@ public class BSActorAvatarMove : BSActor
128 BSMotor.Infinite, // decay time scale 128 BSMotor.Infinite, // decay time scale
129 1f // efficiency 129 1f // efficiency
130 ); 130 );
131 m_velocityMotor.ErrorZeroThreshold = BSParam.AvatarStopZeroThreshold;
131 // _velocityMotor.PhysicsScene = PhysicsScene; // DEBUG DEBUG so motor will output detail log messages. 132 // _velocityMotor.PhysicsScene = PhysicsScene; // DEBUG DEBUG so motor will output detail log messages.
132 SetVelocityAndTarget(m_controllingPrim.RawVelocity, m_controllingPrim.TargetVelocity, true /* inTaintTime */); 133 SetVelocityAndTarget(m_controllingPrim.RawVelocity, m_controllingPrim.TargetVelocity, true /* inTaintTime */);
133 134
diff --git a/OpenSim/Region/Physics/BulletSPlugin/BSParam.cs b/OpenSim/Region/Physics/BulletSPlugin/BSParam.cs
index 2f1799b..43aa63e 100755
--- a/OpenSim/Region/Physics/BulletSPlugin/BSParam.cs
+++ b/OpenSim/Region/Physics/BulletSPlugin/BSParam.cs
@@ -134,6 +134,7 @@ public static class BSParam
134 public static float AvatarHeightMidFudge { get; private set; } 134 public static float AvatarHeightMidFudge { get; private set; }
135 public static float AvatarHeightHighFudge { get; private set; } 135 public static float AvatarHeightHighFudge { get; private set; }
136 public static float AvatarContactProcessingThreshold { get; private set; } 136 public static float AvatarContactProcessingThreshold { get; private set; }
137 public static float AvatarStopZeroThreshold { get; private set; }
137 public static int AvatarJumpFrames { get; private set; } 138 public static int AvatarJumpFrames { get; private set; }
138 public static float AvatarBelowGroundUpCorrectionMeters { get; private set; } 139 public static float AvatarBelowGroundUpCorrectionMeters { get; private set; }
139 public static float AvatarStepHeight { get; private set; } 140 public static float AvatarStepHeight { get; private set; }
@@ -575,6 +576,8 @@ public static class BSParam
575 0.1f ), 576 0.1f ),
576 new ParameterDefn<float>("AvatarContactProcessingThreshold", "Distance from capsule to check for collisions", 577 new ParameterDefn<float>("AvatarContactProcessingThreshold", "Distance from capsule to check for collisions",
577 0.1f ), 578 0.1f ),
579 new ParameterDefn<float>("AvatarStopZeroThreshold", "Movement velocity below which avatar is assumed to be stopped",
580 0.1f ),
578 new ParameterDefn<float>("AvatarBelowGroundUpCorrectionMeters", "Meters to move avatar up if it seems to be below ground", 581 new ParameterDefn<float>("AvatarBelowGroundUpCorrectionMeters", "Meters to move avatar up if it seems to be below ground",
579 1.0f ), 582 1.0f ),
580 new ParameterDefn<int>("AvatarJumpFrames", "Number of frames to allow jump forces. Changes jump height.", 583 new ParameterDefn<int>("AvatarJumpFrames", "Number of frames to allow jump forces. Changes jump height.",