aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Physics/BulletSPlugin/BSConstraint.cs
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/Physics/BulletSPlugin/BSConstraint.cs')
-rwxr-xr-xOpenSim/Region/Physics/BulletSPlugin/BSConstraint.cs12
1 files changed, 11 insertions, 1 deletions
diff --git a/OpenSim/Region/Physics/BulletSPlugin/BSConstraint.cs b/OpenSim/Region/Physics/BulletSPlugin/BSConstraint.cs
index fbb9e21..07f5a21 100755
--- a/OpenSim/Region/Physics/BulletSPlugin/BSConstraint.cs
+++ b/OpenSim/Region/Physics/BulletSPlugin/BSConstraint.cs
@@ -50,7 +50,8 @@ public class BSConstraint : IDisposable
50 m_body2 = obj2; 50 m_body2 = obj2;
51 m_constraint = new BulletConstraint(BulletSimAPI.CreateConstraint2(m_world.Ptr, m_body1.Ptr, m_body2.Ptr, 51 m_constraint = new BulletConstraint(BulletSimAPI.CreateConstraint2(m_world.Ptr, m_body1.Ptr, m_body2.Ptr,
52 frame1, frame1rot, 52 frame1, frame1rot,
53 frame2, frame2rot)); 53 frame2, frame2rot,
54 true /*useLinearReferenceFrameA*/, true /*disableCollisionsBetweenLinkedBodies*/));
54 m_enabled = true; 55 m_enabled = true;
55 } 56 }
56 57
@@ -83,6 +84,15 @@ public class BSConstraint : IDisposable
83 return ret; 84 return ret;
84 } 85 }
85 86
87 public bool SetCFMAndERP(float cfm, float erp)
88 {
89 bool ret = false;
90 BulletSimAPI.SetConstraintParam2(m_constraint.Ptr, ConstraintParams.BT_CONSTRAINT_STOP_CFM, cfm, ConstraintParamAxis.AXIS_ALL);
91 BulletSimAPI.SetConstraintParam2(m_constraint.Ptr, ConstraintParams.BT_CONSTRAINT_STOP_ERP, erp, ConstraintParamAxis.AXIS_ALL);
92 BulletSimAPI.SetConstraintParam2(m_constraint.Ptr, ConstraintParams.BT_CONSTRAINT_CFM, cfm, ConstraintParamAxis.AXIS_ALL);
93 return ret;
94 }
95
86 public bool UseFrameOffset(bool useOffset) 96 public bool UseFrameOffset(bool useOffset)
87 { 97 {
88 bool ret = false; 98 bool ret = false;