TOKRB_ApplyImpulse(RigidBody%,X#,Y#,Z#) |
Parameters: RigidBody% = Rigid Body handle X# = X force of impulse Y# = Y force of impulse Z# = Z force of impulse |
Return value: None |
Description: Applys an impulse to the rigid body. This impulse is similar to a force, except that it only occurs for one frame. Keep in mind that this is not avelocity. it is a force, which means that the magnitude will be divided by the mass of the object to obtain velocity. |
Applies a random impulse to all the rigid bodies when the space bar is pressed If KeyHit(57) Then For i=1 To ENTS TOKRB_ApplyImpulse rb(i),Rnd(-15.0,15.0),Rnd(0,15.0),Rnd(-15.0,15.0) Next EndIf |