diff options
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Region/Physics/BulletSPlugin/BSCharacter.cs | 12 |
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 |