Custom6DOF slider limits

A place to discuss everything related to Newton Dynamics.

Moderators: Sascha Willems, walaber

Custom6DOF slider limits

Postby Leadwerks » Fri May 15, 2009 7:06 pm

I am creating a slider as follows:
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
User avatar
Leadwerks
 
Posts: 539
Joined: Fri Oct 27, 2006 2:54 pm

Return to General Discussion

Who is online

Users browsing this forum: No registered users and 4 guests

cron