AddRelativeForceY(float, ForceMode2D)
Adds a force to the Y component of the Rigidbody2D.linearVelocity in the local space of the Rigidbody2D only leaving the X component of the local space Rigidbody2D.linearVelocity untouched.
Read time 1 minuteLast updated 11 days ago
Definition
- Type: Method
- Namespace: UnityEngine
- Assembly: UnityEngine.Physics2DModule
public void AddRelativeForceY(float force, ForceMode2D mode = ForceMode2D.Force)
Parameters
The force to add to the Y component of the Linear Velocity in the local space of the Rigidbody2D.
The method used to apply the specified force.
Remarks
Additional Resources: Rigidbody2D.AddRelativeForceX and Rigidbody2D.AddRelativeForce.