aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Physics/BulletSPlugin/BSCharacter.cs
diff options
context:
space:
mode:
authorRobert Adams2013-02-12 15:45:44 -0800
committerRobert Adams2013-02-12 15:52:10 -0800
commit0194a3d890b95c8a29fcdf130c378e3a8a629c77 (patch)
treedf1d9993266ab8460809fb8c901e7f08d7b3bdba /OpenSim/Region/Physics/BulletSPlugin/BSCharacter.cs
parentBulletSim: More work on center-of-mass. Remove linksetinfo and rely on simula... (diff)
downloadopensim-SC-0194a3d890b95c8a29fcdf130c378e3a8a629c77.zip
opensim-SC-0194a3d890b95c8a29fcdf130c378e3a8a629c77.tar.gz
opensim-SC-0194a3d890b95c8a29fcdf130c378e3a8a629c77.tar.bz2
opensim-SC-0194a3d890b95c8a29fcdf130c378e3a8a629c77.tar.xz
BulletSim: fix density since the simulator/viewer track density in a
funny unit that is 100 times real density (default 1000). Fix avatar drifting slowly when stationary flying. Fix for physical prims getting corrected for being under terrain when it was just its geometric center that was below terrain. Add PreUpdatePropertyAction allowing plugable modifiction of phys parameters returned from Bullet. Fix an exception setting GravityMultiplier on initialization. Update DLLs and SOs for good measure (no functional change).
Diffstat (limited to 'OpenSim/Region/Physics/BulletSPlugin/BSCharacter.cs')
-rw-r--r--OpenSim/Region/Physics/BulletSPlugin/BSCharacter.cs13
1 files changed, 11 insertions, 2 deletions
diff --git a/OpenSim/Region/Physics/BulletSPlugin/BSCharacter.cs b/OpenSim/Region/Physics/BulletSPlugin/BSCharacter.cs
index 04fb05b..8dca7c6 100644
--- a/OpenSim/Region/Physics/BulletSPlugin/BSCharacter.cs
+++ b/OpenSim/Region/Physics/BulletSPlugin/BSCharacter.cs
@@ -83,7 +83,7 @@ public sealed class BSCharacter : BSPhysObject
83 _velocity = OMV.Vector3.Zero; 83 _velocity = OMV.Vector3.Zero;
84 _buoyancy = ComputeBuoyancyFromFlying(isFlying); 84 _buoyancy = ComputeBuoyancyFromFlying(isFlying);
85 Friction = BSParam.AvatarStandingFriction; 85 Friction = BSParam.AvatarStandingFriction;
86 Density = BSParam.AvatarDensity; 86 Density = BSParam.AvatarDensity / BSParam.DensityScaleFactor;
87 87
88 // Old versions of ScenePresence passed only the height. If width and/or depth are zero, 88 // Old versions of ScenePresence passed only the height. If width and/or depth are zero,
89 // replace with the default values. 89 // replace with the default values.
@@ -231,6 +231,15 @@ public sealed class BSCharacter : BSPhysObject
231 PhysicsScene.PE.SetFriction(PhysBody, Friction); 231 PhysicsScene.PE.SetFriction(PhysBody, Friction);
232 } 232 }
233 } 233 }
234 else
235 {
236 if (Flying)
237 {
238 // Flying and not collising and velocity nearly zero.
239 ZeroMotion(true /* inTaintTime */);
240 }
241 }
242
234 DetailLog("{0},BSCharacter.MoveMotor,taint,stopping,target={1},colliding={2}", LocalID, _velocityMotor.TargetValue, IsColliding); 243 DetailLog("{0},BSCharacter.MoveMotor,taint,stopping,target={1},colliding={2}", LocalID, _velocityMotor.TargetValue, IsColliding);
235 } 244 }
236 else 245 else
@@ -869,7 +878,7 @@ public sealed class BSCharacter : BSPhysObject
869 * Math.Min(Size.X, Size.Y) / 2 878 * Math.Min(Size.X, Size.Y) / 2
870 * Size.Y / 2f // plus the volume of the capsule end caps 879 * Size.Y / 2f // plus the volume of the capsule end caps
871 ); 880 );
872 _mass = Density * _avatarVolume; 881 _mass = Density * BSParam.DensityScaleFactor * _avatarVolume;
873 } 882 }
874 883
875 // The physics engine says that properties have updated. Update same and inform 884 // The physics engine says that properties have updated. Update same and inform