aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Physics/BulletSPlugin/BSDynamics.cs
diff options
context:
space:
mode:
authorRobert Adams2012-12-25 23:55:25 -0800
committerRobert Adams2012-12-25 23:55:25 -0800
commitd1ede1df3a04428c83a9937059a0df00d7f3e281 (patch)
treec2f9943a0e6a12c432cbd927520e92deb2a4c013 /OpenSim/Region/Physics/BulletSPlugin/BSDynamics.cs
parentBulletSim: stop avatar from sliding VERY slowly after walking by (diff)
downloadopensim-SC_OLD-d1ede1df3a04428c83a9937059a0df00d7f3e281.zip
opensim-SC_OLD-d1ede1df3a04428c83a9937059a0df00d7f3e281.tar.gz
opensim-SC_OLD-d1ede1df3a04428c83a9937059a0df00d7f3e281.tar.bz2
opensim-SC_OLD-d1ede1df3a04428c83a9937059a0df00d7f3e281.tar.xz
BulletSim: make llBuoyancy work. For some reason, Bullet resets an
object's individual gravity to the world gravity when the object is added to the physical world.
Diffstat (limited to 'OpenSim/Region/Physics/BulletSPlugin/BSDynamics.cs')
-rw-r--r--OpenSim/Region/Physics/BulletSPlugin/BSDynamics.cs3
1 files changed, 3 insertions, 0 deletions
diff --git a/OpenSim/Region/Physics/BulletSPlugin/BSDynamics.cs b/OpenSim/Region/Physics/BulletSPlugin/BSDynamics.cs
index 3fde57b..a8edd23 100644
--- a/OpenSim/Region/Physics/BulletSPlugin/BSDynamics.cs
+++ b/OpenSim/Region/Physics/BulletSPlugin/BSDynamics.cs
@@ -573,6 +573,9 @@ namespace OpenSim.Region.Physics.BulletSPlugin
573 BulletSimAPI.SetMassProps2(Prim.PhysBody.ptr, m_vehicleMass, localInertia); 573 BulletSimAPI.SetMassProps2(Prim.PhysBody.ptr, m_vehicleMass, localInertia);
574 BulletSimAPI.UpdateInertiaTensor2(Prim.PhysBody.ptr); 574 BulletSimAPI.UpdateInertiaTensor2(Prim.PhysBody.ptr);
575 575
576 Vector3 grav = PhysicsScene.DefaultGravity * (1f - Prim.Buoyancy);
577 BulletSimAPI.SetGravity2(Prim.PhysBody.ptr, grav);
578
576 VDetailLog("{0},BSDynamics.Refresh,mass={1},frict={2},inert={3},aDamp={4}", 579 VDetailLog("{0},BSDynamics.Refresh,mass={1},frict={2},inert={3},aDamp={4}",
577 Prim.LocalID, m_vehicleMass, friction, localInertia, angularDamping); 580 Prim.LocalID, m_vehicleMass, friction, localInertia, angularDamping);
578 } 581 }