aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Physics/BulletSPlugin/BSPhysObject.cs
diff options
context:
space:
mode:
authorRobert Adams2013-09-10 17:32:01 -0700
committerRobert Adams2013-09-11 09:12:24 -0700
commit6e39cc316f502855a89c51775e7394b73135ab86 (patch)
tree30ae219ec41952beb10bf2b3dd04839bdd03c157 /OpenSim/Region/Physics/BulletSPlugin/BSPhysObject.cs
parentBulletSim: update DLLs and SOs for spring parameters and constraint (diff)
downloadopensim-SC_OLD-6e39cc316f502855a89c51775e7394b73135ab86.zip
opensim-SC_OLD-6e39cc316f502855a89c51775e7394b73135ab86.tar.gz
opensim-SC_OLD-6e39cc316f502855a89c51775e7394b73135ab86.tar.bz2
opensim-SC_OLD-6e39cc316f502855a89c51775e7394b73135ab86.tar.xz
BulletSim: add ClearCollisionProxyCache function to API.
Add proxy cache clearing when some properties are changed. This fixes a problem where objects would stop colliding of they were moved with setPosition mulitple times.
Diffstat (limited to '')
-rwxr-xr-xOpenSim/Region/Physics/BulletSPlugin/BSPhysObject.cs12
1 files changed, 10 insertions, 2 deletions
diff --git a/OpenSim/Region/Physics/BulletSPlugin/BSPhysObject.cs b/OpenSim/Region/Physics/BulletSPlugin/BSPhysObject.cs
index 2efb1a5..47df611 100755
--- a/OpenSim/Region/Physics/BulletSPlugin/BSPhysObject.cs
+++ b/OpenSim/Region/Physics/BulletSPlugin/BSPhysObject.cs
@@ -300,8 +300,16 @@ public abstract class BSPhysObject : PhysicsActor
300 // Called in taint-time!! 300 // Called in taint-time!!
301 public void ActivateIfPhysical(bool forceIt) 301 public void ActivateIfPhysical(bool forceIt)
302 { 302 {
303 if (IsPhysical && PhysBody.HasPhysicalBody) 303 if (PhysBody.HasPhysicalBody)
304 PhysScene.PE.Activate(PhysBody, forceIt); 304 {
305 // Clear the collision cache since we've changed some properties.
306 PhysScene.PE.ClearCollisionProxyCache(PhysScene.World, PhysBody);
307 if (IsPhysical)
308 {
309 // Physical objects might need activating
310 PhysScene.PE.Activate(PhysBody, forceIt);
311 }
312 }
305 } 313 }
306 314
307 // 'actors' act on the physical object to change or constrain its motion. These can range from 315 // 'actors' act on the physical object to change or constrain its motion. These can range from