AddRelativeForce(Vector2, ForceMode2D)
Adds a force to the local space _linearVelocity. In other words, the force is applied in the rotated coordinate space of the Rigidbody2D.
Read time 1 minuteLast updated 12 days ago
Definition
- Type: Method
- Namespace: UnityEngine
- Assembly: UnityEngine.Physics2DModule
public void AddRelativeForce(Vector2 relativeForce, ForceMode2D mode = ForceMode2D.Force)
Parameters
Components of the force in the X and Y axes.
The method used to apply the specified force.