- Code: Select all
'Calculate pins and pivot frame
pinAndPivotFrame=TMat4.FromDir(pin3,1)
pinAndPivotFrame.tx=pos3.x
pinAndPivotFrame.ty=pos3.y
pinAndPivotFrame.tz=pos3.z
joint.newtonJoint=CreateCustomJoint6DOF(pinAndPivotFrame,pinAndPivotFrame,child.newtonBody,parent.newtonBody)
Local minLinearLimits:Float[]=[-1.0,0.0,0.0,0.0]
Local maxLinearLimits:Float[]=[+1.0,0.0,0.0,0.0]
Local minAngularLimits:Float[]=[0.0,0.0,0.0,0.0]
Local maxAngularLimits:Float[]=[0.0,0.0,0.0,0.0]
CustomJoint6DOF_SetLinearLimits(joint.newtonJoint,minLinearLimits,maxLinearLimits)
CustomJoint6DOF_SetAngularLimits(joint.newtonJoint,minAngularLimits,maxAngularLimits)
I am not getting the expected results when I alter the min and max linear limits. The example above produces a slider with no limits. Here is a demo:
http://www.leadwerks.com/post/slidertest.zip