From 5ab151c2d69277b8c528b8ebe94d2b0d2312a2fc Mon Sep 17 00:00:00 2001 From: Robert Adams Date: Wed, 8 Aug 2012 13:48:49 -0700 Subject: BulletSim: add avatar code to keep avatars from ending up trapped under the terrain --- OpenSim/Region/Physics/BulletSPlugin/BSLinkset.cs | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) (limited to 'OpenSim/Region/Physics/BulletSPlugin/BSLinkset.cs') diff --git a/OpenSim/Region/Physics/BulletSPlugin/BSLinkset.cs b/OpenSim/Region/Physics/BulletSPlugin/BSLinkset.cs index 6f8430c..d19c4b8 100755 --- a/OpenSim/Region/Physics/BulletSPlugin/BSLinkset.cs +++ b/OpenSim/Region/Physics/BulletSPlugin/BSLinkset.cs @@ -296,13 +296,13 @@ public class BSLinkset DetailLog("{0},LinkAChildToMe,taint,root={1},child={2}", m_linksetRoot.LocalID, m_linksetRoot.LocalID, childPrim.LocalID); BSConstraint constrain = m_scene.Constraints.CreateConstraint( m_scene.World, m_linksetRoot.Body, childPrim.Body, - // childRelativePosition, - // childRelativeRotation, + childRelativePosition, + childRelativeRotation, OMV.Vector3.Zero, - OMV.Quaternion.Identity, - OMV.Vector3.Zero, - OMV.Quaternion.Identity + -childRelativeRotation ); + + // zero linear and angular limits makes the objects unable to move in relation to each other constrain.SetLinearLimits(OMV.Vector3.Zero, OMV.Vector3.Zero); constrain.SetAngularLimits(OMV.Vector3.Zero, OMV.Vector3.Zero); @@ -339,7 +339,8 @@ public class BSLinkset // Invoke the detailed logger and output something if it's enabled. private void DebugLog(string msg, params Object[] args) { - m_scene.Logger.DebugFormat(msg, args); + if (m_scene.ShouldDebugLog) + m_scene.Logger.DebugFormat(msg, args); } // Invoke the detailed logger and output something if it's enabled. -- cgit v1.1