TOKRB_AddBox(RigidBody%,Width#,Height#,Depth#) |
Parameters: RigidBody% = Rigid Body Handle Width# = Width of box Height# = Height of box Depth# = Depth of box |
Return value: Box geometry's handle for later modification. |
Description: Adds a box geometry to a Rigid Body. |
A function that creates a cube along with a graphical representation. Function addbox(mesh,RigidBody,x#,y#,z#,Width#,Height#,Depth#,Pitch#=0,Yaw#=0,Roll#=0,alpha=1) TOKGEOM_SetPositionAndRotation TOKRB_AddBox(RigidBody,Width#,Height#,Depth#),x#,y#,z#,Pitch#,Yaw#,Roll# c=CreateCube(mesh) ScaleEntity c,Width#/2,Height#/2,Depth#/2,1 PositionEntity c,x#,y#,z#,1 RotateEntity c,Pitch#,Yaw#,Roll#,1 End Function |