Applying forces

For actors that are added to the physics system with a dynamic physics body type, you can apply force in various ways to make it move.

  • applyTorque - Applies a continuous rotational force (torque) to an object. This method is used to change the angular velocity of the object over time. The torque is specified in the global coordinate system.

    • torque: A vector representing the torque to be applied. This vector determines the direction and magnitude of the rotational force.

  • applyTorqueImpulse - Applies an instantaneous torque impulse to an object. This method is used to change the angular velocity of the object immediately. The impulse is specified in the global coordinate system.

    • torqueImpulse: A vector representing the torque impulse to be applied. This vector determines the direction and magnitude of the instantaneous rotational force.

  • applyForce - Applies a continuous force to an object. This method is used to change the linear velocity of the object over time. The force is specified in the global coordinate system and can be applied at a specific point on the object.

    • force: A vector representing the force to be applied. This vector determines the direction and magnitude of the force.

  • applyImpulse - Applies an instantaneous force impulse to an object. This method is used to change the linear velocity of the object immediately. The impulse is specified in the global coordinate system and can be applied at a specific point on the object.

    • force: A vector representing the force impulse to be applied. This vector determines the direction and magnitude of the instantaneous force.

  • applyLocalForce - Applies a continuous force to an object. This method is used to change the linear velocity of the object over time.

    • force: A vector representing the force to be applied in the object's local coordinate system.

    • localPoint: A vector representing the point of application of the force in the global coordinate system.

  • applyLocalImpulse - Applies an instantaneous force impulse to an object. This method is used to change the linear velocity of the object immediately.

    • force: A vector representing the force impulse to be applied in the object's local coordinate system.

    • localPoint : A vector representing the point of application of the impulse in the object's global coordinate system.

Last updated