TOKJOINT_SetLowerLimit(Joint%,Limit#)
Parameters:
Joint% = The joint's handle
Limit# = The lower limit of the joint. From 0 to PI for Ball&Socket joints. From -PI to PI for hinges
Return value:
None
Description:
Sets the lower limit for the joint. For Ball&Socket joints, this is the inner angle - usually 0.
A hinge joint and ball joint from TOKA_JOINTSWITHDAMPING.bb
joint = TOKJOINT_Create(1,rb,0)
TOKJOINT_SetPositionAndRotationWorld(joint,0.0,4.0,0.0,0,0,90)
TOKJOINT_SetType(joint,1)
TOKJOINT_SetLowerLimit joint,3.14*0.0 ; (0 degrees)
TOKJOINT_SetUpperLimit joint,3.14*0.5  ; (+90 degrees)
TOKJOINT_EnableLimit joint,True
TOKJOINT_Enable(joint,True)
TOKJOINT_SetDampingFactor joint,30.0

joint2 = TOKJOINT_Create(2,rb,rb2)
TOKJOINT_SetPositionAndRotationWorld(joint2,0.0,2.0,-1.0,0,0,90)
TOKJOINT_SetType(joint2,3)
TOKJOINT_SetLowerLimit joint2,3.14*0.0 ; (0 degrees)
TOKJOINT_SetUpperLimit joint2,3.14*0.97  ; (+90  degrees)
TOKJOINT_EnableLimit joint2,True
TOKJOINT_Enable(joint2,True)
TOKJOINT_SetDampingFactor joint2,0.1



Documentation generated by Cod2Doc on 20 Jun 2004.