The AngularVelocity
property of the PhysicsBody
class represents the angular velocity of the physics body in world space. Angular velocity is a vector quantity that describes the rotational speed and direction of the body.
The AngularVelocity
property of the PhysicsBody
class represents the angular velocity of the physics body in world space. Angular velocity is a vector quantity that describes the rotational speed and direction of the body.
Use the AngularVelocity
property to get or set the angular velocity of a PhysicsBody
instance. This property is useful for simulating rotational dynamics in a physics simulation.
// Example of setting the angular velocity of a PhysicsBody PhysicsBody body = new PhysicsBody(); body.AngularVelocity = new Vector3(0, 1, 0); // Sets the angular velocity to rotate around the Y-axis // Example of getting the angular velocity of a PhysicsBody Vector3 currentAngularVelocity = body.AngularVelocity; // Use currentAngularVelocity for further calculations or logic