TOKJOINT_SetPositionAndRotationWorld(Joint%,X#,Y#,Z#,Pitch#,Yaw#,Roll#) |
Parameters: Joint% = The joint's handle X# = X component of position Y# = Y component of position Z# = Z component of position Pitch# = Joint's Pitch Yaw# = Joint's Yaw Roll# = Joint's Roll |
Return value: None |
Description: Sets the position and rotation of the joint. |
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 |