文档

Unity Engine

Unity Engine

AddRelativeForce(Vector2, ForceMode2D)

Adds a force to the local space Rigidbody2D.linearVelocity. In other words, the force is applied in the rotated coordinate space of the Rigidbody2D.
阅读时间1 分钟最后更新于 2 天前

Definition

public void AddRelativeForce(Vector2 relativeForce, ForceMode2D mode = ForceMode2D.Force)

Parameters

relativeForce

Components of the force in the X and Y axes.

The method used to apply the specified force.

Remarks