TOKJOINT_EnableLimit(Joint%,Enabled%) |
Parameters: Joint% = The joint's handle Enabled% = True/False whether or not the first set of limitations is enabled. |
Return value: None |
Description: Enables or disables the limits set by TOKJOINT_SetUpperLimit() and TOKJOINT_SetLowerLimit(). |
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 |