Documentation

Unity Engine


User Manual

Script Reference

Unity Engine


ApplyForceToCenter(Vector2, bool)

Apply a force to the center of mass. PhysicsBody.ApplyForceToCenter.
Read time 1 minuteLast updated 12 days ago

Definition

  • Type: Method
  • Namespace: Unity.U2D.Physics
  • Assembly: UnityEngine.PhysicsCore2DModule
public void ApplyForceToCenter(Vector2 force, bool wake = true)

Parameters

force

The world force vector, usually in newtons (N).

wake

Should the body be woken up.