TOKRB_AddSphere(RigidBody%,Diameter#) |
Parameters: RigidBody% = Rigid Body handle Diameter# = Diameter of sphere |
Return value: Sphere geometry's handle for later modification. |
Description: Adds a sphere geometry to a Rigid Body. |
A function that creates a sphere along with a graphical representation. Function addsphere(mesh,RigidBody,x#,y#,z#,Diameter#,Pitch#=0,Yaw#=0,Roll#=0,alpha=1) TOKGEOM_SetPositionAndRotation TOKRB_AddSphere(RigidBody,Diameter#),x#,y#,z#,Pitch#,Yaw#,Roll# c=CreateSphere(8,mesh) ScaleEntity c,Diameter#/2,Diameter#/2,Diameter#/2,1 PositionEntity c,x#,y#,z#,1 RotateEntity c,Pitch#,Yaw#,Roll#,1 End Function |