From dacc20ee48883efe3702c284edff5ee3fa0e96b0 Mon Sep 17 00:00:00 2001 From: Robert Adams Date: Wed, 11 Sep 2013 16:48:15 -0700 Subject: [PATCH] BulletSim: remove collision cache clearing logic for physical objects. This fixes constraints from getting messed up when properties change. --- OpenSim/Region/Physics/BulletSPlugin/BSPhysObject.cs | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/OpenSim/Region/Physics/BulletSPlugin/BSPhysObject.cs b/OpenSim/Region/Physics/BulletSPlugin/BSPhysObject.cs index 47df611de5..f89b376543 100755 --- a/OpenSim/Region/Physics/BulletSPlugin/BSPhysObject.cs +++ b/OpenSim/Region/Physics/BulletSPlugin/BSPhysObject.cs @@ -302,13 +302,16 @@ public abstract class BSPhysObject : PhysicsActor { if (PhysBody.HasPhysicalBody) { - // Clear the collision cache since we've changed some properties. - PhysScene.PE.ClearCollisionProxyCache(PhysScene.World, PhysBody); if (IsPhysical) { // Physical objects might need activating PhysScene.PE.Activate(PhysBody, forceIt); } + else + { + // Clear the collision cache since we've changed some properties. + PhysScene.PE.ClearCollisionProxyCache(PhysScene.World, PhysBody); + } } }