Documentation

Unity Engine


User Manual

Script Reference

Unity Engine


AddForceY(float, ForceMode2D)

Adds a force to the Y component of the _linearVelocity only leaving the X component of the world space _linearVelocity untouched.
Read time 1 minuteLast updated 4 days ago

Definition

  • Type: Method
  • Namespace: UnityEngine
  • Assembly: UnityEngine.Physics2DModule
public void AddForceY(float force, ForceMode2D mode = ForceMode2D.Force)

Parameters

force

The force to add to the Y component of the Linear Velocity in the world space of the Rigidbody2D.

The method used to apply the specified force.

Remarks