文档

Unity Engine

Unity Engine

ApplyLinearImpulseToCenter(Vector2, bool)

Apply an impulse to the center of mass. This immediately modifies the velocity. This should be used for one-shot impulses. If you need a steady force, use a force instead, which will work better with the sub-stepping solver.
阅读时间1 分钟最后更新于 1 个月前

Definition

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

Parameters

impulse

The world impulse vector, usually in N"s or kg"m/s.

wake

Should the body be woken up.