diff options
author | Robert Adams | 2012-07-25 10:42:02 -0700 |
---|---|---|
committer | Robert Adams | 2012-07-25 16:31:04 -0700 |
commit | 75f7721b0c954f8dc0bbaac6c333aba52e275ea2 (patch) | |
tree | 62240af88f8f558d7355dca025efea2d3bd2d0b6 /OpenSim/Region/Physics/BulletSPlugin | |
parent | BulletSim: Redo parameter specification so only one place has (diff) | |
download | opensim-SC_OLD-75f7721b0c954f8dc0bbaac6c333aba52e275ea2.zip opensim-SC_OLD-75f7721b0c954f8dc0bbaac6c333aba52e275ea2.tar.gz opensim-SC_OLD-75f7721b0c954f8dc0bbaac6c333aba52e275ea2.tar.bz2 opensim-SC_OLD-75f7721b0c954f8dc0bbaac6c333aba52e275ea2.tar.xz |
BulletSim: small change to use the pointer to the bullet object for zeroing forces.
Diffstat (limited to 'OpenSim/Region/Physics/BulletSPlugin')
-rw-r--r-- | OpenSim/Region/Physics/BulletSPlugin/BSPrim.cs | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/OpenSim/Region/Physics/BulletSPlugin/BSPrim.cs b/OpenSim/Region/Physics/BulletSPlugin/BSPrim.cs index ff87955..6c8ae2e 100644 --- a/OpenSim/Region/Physics/BulletSPlugin/BSPrim.cs +++ b/OpenSim/Region/Physics/BulletSPlugin/BSPrim.cs | |||
@@ -169,7 +169,7 @@ public sealed class BSPrim : PhysicsActor | |||
169 | _parentPrim = null; | 169 | _parentPrim = null; |
170 | } | 170 | } |
171 | 171 | ||
172 | // make sure there are no other prims are linked to me | 172 | // make sure there are no other prims linked to me |
173 | UnlinkAllChildren(); | 173 | UnlinkAllChildren(); |
174 | 174 | ||
175 | // everything in the C# world will get garbage collected. Tell the C++ world to free stuff. | 175 | // everything in the C# world will get garbage collected. Tell the C++ world to free stuff. |
@@ -341,11 +341,10 @@ public sealed class BSPrim : PhysicsActor | |||
341 | _rotationalVelocity = OMV.Vector3.Zero; | 341 | _rotationalVelocity = OMV.Vector3.Zero; |
342 | 342 | ||
343 | // Zero some other properties directly into the physics engine | 343 | // Zero some other properties directly into the physics engine |
344 | BulletBody obj = new BulletBody(LocalID, BulletSimAPI.GetBodyHandleWorldID2(_scene.WorldID, LocalID)); | 344 | BulletSimAPI.SetVelocity2(Body.Ptr, OMV.Vector3.Zero); |
345 | BulletSimAPI.SetVelocity2(obj.Ptr, OMV.Vector3.Zero); | 345 | BulletSimAPI.SetAngularVelocity2(Body.Ptr, OMV.Vector3.Zero); |
346 | BulletSimAPI.SetAngularVelocity2(obj.Ptr, OMV.Vector3.Zero); | 346 | BulletSimAPI.SetInterpolation2(Body.Ptr, OMV.Vector3.Zero, OMV.Vector3.Zero); |
347 | BulletSimAPI.SetInterpolation2(obj.Ptr, OMV.Vector3.Zero, OMV.Vector3.Zero); | 347 | BulletSimAPI.ClearForces2(Body.Ptr); |
348 | BulletSimAPI.ClearForces2(obj.Ptr); | ||
349 | } | 348 | } |
350 | 349 | ||
351 | public override void LockAngularMotion(OMV.Vector3 axis) | 350 | public override void LockAngularMotion(OMV.Vector3 axis) |