void ApplyAngularImpulse( Vector3 impulse )

book_4_sparkGenerated
code_blocksInput

Description

The ApplyAngularImpulse method applies an angular impulse to the PhysicsBody. This method is used to change the angular velocity of the body by applying a rotational force. The impulse is specified as a Vector3, which represents the magnitude and direction of the impulse in world space.

Usage

Use this method when you want to apply a rotational force to a PhysicsBody to change its angular velocity. This can be useful for simulating effects like spinning or rotating an object in response to an event or interaction.

Example

// Create a new PhysicsBody
PhysicsBody body = new PhysicsBody();

// Define an angular impulse
Vector3 angularImpulse = new Vector3(0, 10, 0);

// Apply the angular impulse to the body
body.ApplyAngularImpulse(angularImpulse);