aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Physics/BulletSPlugin/BSCharacter.cs
diff options
context:
space:
mode:
authorRobert Adams2011-07-22 15:23:57 -0700
committerMic Bowman2011-07-22 15:23:57 -0700
commit869883f2dc51f2b2210ccf8fd41f3de0c07e39fc (patch)
tree9da95f3b54517e3025ca7f248ccb8103bbee9bb0 /OpenSim/Region/Physics/BulletSPlugin/BSCharacter.cs
parentMerge branch 'bulletsim' of ssh://opensimulator.org/var/git/opensim into bull... (diff)
downloadopensim-SC_OLD-869883f2dc51f2b2210ccf8fd41f3de0c07e39fc.zip
opensim-SC_OLD-869883f2dc51f2b2210ccf8fd41f3de0c07e39fc.tar.gz
opensim-SC_OLD-869883f2dc51f2b2210ccf8fd41f3de0c07e39fc.tar.bz2
opensim-SC_OLD-869883f2dc51f2b2210ccf8fd41f3de0c07e39fc.tar.xz
BulletSim: fix buoyancy for prims. Start of configurable physics parameters.
Diffstat (limited to 'OpenSim/Region/Physics/BulletSPlugin/BSCharacter.cs')
-rw-r--r--OpenSim/Region/Physics/BulletSPlugin/BSCharacter.cs12
1 files changed, 9 insertions, 3 deletions
diff --git a/OpenSim/Region/Physics/BulletSPlugin/BSCharacter.cs b/OpenSim/Region/Physics/BulletSPlugin/BSCharacter.cs
index dbd7285..82361ad 100644
--- a/OpenSim/Region/Physics/BulletSPlugin/BSCharacter.cs
+++ b/OpenSim/Region/Physics/BulletSPlugin/BSCharacter.cs
@@ -107,7 +107,7 @@ public class BSCharacter : PhysicsActor
107 shapeData.Velocity = _velocity; 107 shapeData.Velocity = _velocity;
108 shapeData.Scale = _scale; 108 shapeData.Scale = _scale;
109 shapeData.Mass = _mass; 109 shapeData.Mass = _mass;
110 shapeData.Buoyancy = isFlying ? 0f : 1f; 110 shapeData.Buoyancy = isFlying ? 1f : 0f;
111 shapeData.Static = ShapeData.numericFalse; 111 shapeData.Static = ShapeData.numericFalse;
112 112
113 // do actual create at taint time 113 // do actual create at taint time
@@ -258,7 +258,7 @@ public class BSCharacter : PhysicsActor
258 _scene.TaintedObject(delegate() 258 _scene.TaintedObject(delegate()
259 { 259 {
260 // simulate flying by changing the effect of gravity 260 // simulate flying by changing the effect of gravity
261 BulletSimAPI.SetObjectBuoyancy(_scene.WorldID, LocalID, _flying ? 0f : 1f); 261 BulletSimAPI.SetObjectBuoyancy(_scene.WorldID, LocalID, _flying ? 1f : 0f);
262 }); 262 });
263 } 263 }
264 } 264 }
@@ -296,7 +296,13 @@ public class BSCharacter : PhysicsActor
296 } 296 }
297 public override float Buoyancy { 297 public override float Buoyancy {
298 get { return _buoyancy; } 298 get { return _buoyancy; }
299 set { _buoyancy = value; } 299 set { _buoyancy = value;
300 _scene.TaintedObject(delegate()
301 {
302 // simulate flying by changing the effect of gravity
303 BulletSimAPI.SetObjectBuoyancy(_scene.WorldID, LocalID, _buoyancy);
304 });
305 }
300 } 306 }
301 307
302 // Used for MoveTo 308 // Used for MoveTo