aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Physics/BulletSPlugin/BSPrim.cs
diff options
context:
space:
mode:
authorRobert Adams2012-07-23 10:37:52 -0700
committerRobert Adams2012-07-23 16:32:30 -0700
commit85c6eb7c500b708ab0a91965eca9da20b0b02e50 (patch)
treecf3f3725b5769c93958ec32acc24f6a0d5e5a4ec /OpenSim/Region/Physics/BulletSPlugin/BSPrim.cs
parentBulletSim: improve linking to add each link individually rather than rebuildi... (diff)
downloadopensim-SC_OLD-85c6eb7c500b708ab0a91965eca9da20b0b02e50.zip
opensim-SC_OLD-85c6eb7c500b708ab0a91965eca9da20b0b02e50.tar.gz
opensim-SC_OLD-85c6eb7c500b708ab0a91965eca9da20b0b02e50.tar.bz2
opensim-SC_OLD-85c6eb7c500b708ab0a91965eca9da20b0b02e50.tar.xz
BulletSim: add all the new functions to BulletSimAPI.
Modify ZeroMotion() to not make tainting calls and to use new API calls.
Diffstat (limited to 'OpenSim/Region/Physics/BulletSPlugin/BSPrim.cs')
-rw-r--r--OpenSim/Region/Physics/BulletSPlugin/BSPrim.cs13
1 files changed, 11 insertions, 2 deletions
diff --git a/OpenSim/Region/Physics/BulletSPlugin/BSPrim.cs b/OpenSim/Region/Physics/BulletSPlugin/BSPrim.cs
index a749a97..29ddddd 100644
--- a/OpenSim/Region/Physics/BulletSPlugin/BSPrim.cs
+++ b/OpenSim/Region/Physics/BulletSPlugin/BSPrim.cs
@@ -324,11 +324,20 @@ public sealed class BSPrim : PhysicsActor
324 // Set motion values to zero. 324 // Set motion values to zero.
325 // Do it to the properties so the values get set in the physics engine. 325 // Do it to the properties so the values get set in the physics engine.
326 // Push the setting of the values to the viewer. 326 // Push the setting of the values to the viewer.
327 // Called at taint time!
327 private void ZeroMotion() 328 private void ZeroMotion()
328 { 329 {
329 Velocity = OMV.Vector3.Zero; 330 _velocity = OMV.Vector3.Zero;
330 _acceleration = OMV.Vector3.Zero; 331 _acceleration = OMV.Vector3.Zero;
331 RotationalVelocity = OMV.Vector3.Zero; 332 _rotationalVelocity = OMV.Vector3.Zero;
333
334 IntPtr obj = BulletSimAPI.GetBodyHandleWorldID2(_scene.WorldID, LocalID);
335 BulletSimAPI.SetVelocity2(obj, OMV.Vector3.Zero);
336 BulletSimAPI.SetAngularVelocity2(obj, OMV.Vector3.Zero);
337 BulletSimAPI.SetInterpolation2(obj, OMV.Vector3.Zero, OMV.Vector3.Zero);
338 BulletSimAPI.ClearForces2(obj);
339
340 // make sure this new information is pushed to the client
332 base.RequestPhysicsterseUpdate(); 341 base.RequestPhysicsterseUpdate();
333 } 342 }
334 343