diff options
author | Robert Adams | 2013-09-10 17:32:01 -0700 |
---|---|---|
committer | Robert Adams | 2013-09-11 09:12:24 -0700 |
commit | 6e39cc316f502855a89c51775e7394b73135ab86 (patch) | |
tree | 30ae219ec41952beb10bf2b3dd04839bdd03c157 /OpenSim/Region/Physics/BulletSPlugin/BSPhysObject.cs | |
parent | BulletSim: update DLLs and SOs for spring parameters and constraint (diff) | |
download | opensim-SC-6e39cc316f502855a89c51775e7394b73135ab86.zip opensim-SC-6e39cc316f502855a89c51775e7394b73135ab86.tar.gz opensim-SC-6e39cc316f502855a89c51775e7394b73135ab86.tar.bz2 opensim-SC-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 'OpenSim/Region/Physics/BulletSPlugin/BSPhysObject.cs')
-rwxr-xr-x | OpenSim/Region/Physics/BulletSPlugin/BSPhysObject.cs | 12 |
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 |