Rigidbody2D.AddRelativeForce

Declaration

public void AddRelativeForce(Vector2 relativeForce, ForceMode2D mode = ForceMode2D.Force);

Parameters

relativeForce Components of the force in the X and Y axes.
mode The method used to apply the specified force.

Description

Adds a force to the local space Rigidbody2D.linearVelocity. In other words, the force is applied in the rotated coordinate space of the Rigidbody2D.


Did you find this page useful? Please give it a rating: