Version: 2023.2

Rigidbody2D.AddRelativeForce

切换到手册
public void AddRelativeForce (Vector2 relativeForce, ForceMode2D mode= ForceMode2D.Force);

参数

relativeForce 力在 X 轴和 Y 轴上的分量。
mode 用于施加指定力的方法。

描述

Adds a force to the local space velocity. In other words, the force is applied in the rotated coordinate space of the Rigidbody2D.