aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Physics/BulletSPlugin/BSCharacter.cs
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--OpenSim/Region/Physics/BulletSPlugin/BSCharacter.cs9
1 files changed, 5 insertions, 4 deletions
diff --git a/OpenSim/Region/Physics/BulletSPlugin/BSCharacter.cs b/OpenSim/Region/Physics/BulletSPlugin/BSCharacter.cs
index 8e059ee..bf0545a 100644
--- a/OpenSim/Region/Physics/BulletSPlugin/BSCharacter.cs
+++ b/OpenSim/Region/Physics/BulletSPlugin/BSCharacter.cs
@@ -174,7 +174,7 @@ public sealed class BSCharacter : BSPhysObject
174 BulletSimAPI.SetCcdSweptSphereRadius2(PhysBody.ptr, BSParam.CcdSweptSphereRadius); 174 BulletSimAPI.SetCcdSweptSphereRadius2(PhysBody.ptr, BSParam.CcdSweptSphereRadius);
175 } 175 }
176 176
177 UpdatePhysicalMassProperties(RawMass); 177 UpdatePhysicalMassProperties(RawMass, false);
178 178
179 // Make so capsule does not fall over 179 // Make so capsule does not fall over
180 BulletSimAPI.SetAngularFactorV2(PhysBody.ptr, OMV.Vector3.Zero); 180 BulletSimAPI.SetAngularFactorV2(PhysBody.ptr, OMV.Vector3.Zero);
@@ -224,7 +224,7 @@ public sealed class BSCharacter : BSPhysObject
224 if (PhysBody.HasPhysicalBody && PhysShape.HasPhysicalShape) 224 if (PhysBody.HasPhysicalBody && PhysShape.HasPhysicalShape)
225 { 225 {
226 BulletSimAPI.SetLocalScaling2(PhysShape.ptr, Scale); 226 BulletSimAPI.SetLocalScaling2(PhysShape.ptr, Scale);
227 UpdatePhysicalMassProperties(RawMass); 227 UpdatePhysicalMassProperties(RawMass, true);
228 // Make sure this change appears as a property update event 228 // Make sure this change appears as a property update event
229 BulletSimAPI.PushUpdate2(PhysBody.ptr); 229 BulletSimAPI.PushUpdate2(PhysBody.ptr);
230 } 230 }
@@ -390,7 +390,7 @@ public sealed class BSCharacter : BSPhysObject
390 public override float RawMass { 390 public override float RawMass {
391 get {return _mass; } 391 get {return _mass; }
392 } 392 }
393 public override void UpdatePhysicalMassProperties(float physMass) 393 public override void UpdatePhysicalMassProperties(float physMass, bool inWorld)
394 { 394 {
395 OMV.Vector3 localInertia = BulletSimAPI.CalculateLocalInertia2(PhysShape.ptr, physMass); 395 OMV.Vector3 localInertia = BulletSimAPI.CalculateLocalInertia2(PhysShape.ptr, physMass);
396 BulletSimAPI.SetMassProps2(PhysBody.ptr, physMass, localInertia); 396 BulletSimAPI.SetMassProps2(PhysBody.ptr, physMass, localInertia);
@@ -772,8 +772,9 @@ public sealed class BSCharacter : BSPhysObject
772 // the motor can be turned off. Set the velocity to zero so the zero motion is sent to the viewer. 772 // the motor can be turned off. Set the velocity to zero so the zero motion is sent to the viewer.
773 if (_velocityMotor.TargetValue.ApproxEquals(OMV.Vector3.Zero, 0.01f) && _velocityMotor.ErrorIsZero) 773 if (_velocityMotor.TargetValue.ApproxEquals(OMV.Vector3.Zero, 0.01f) && _velocityMotor.ErrorIsZero)
774 { 774 {
775 stepVelocity = OMV.Vector3.Zero;
776 _velocityMotor.Enabled = false; 775 _velocityMotor.Enabled = false;
776 stepVelocity = OMV.Vector3.Zero;
777 ZeroMotion(true);
777 DetailLog("{0},BSCharacter.UpdateProperties,taint,disableVelocityMotor,m={1}", LocalID, _velocityMotor); 778 DetailLog("{0},BSCharacter.UpdateProperties,taint,disableVelocityMotor,m={1}", LocalID, _velocityMotor);
778 } 779 }
779 780