言語: 日本語
  • C#
  • JS
  • Boo

スクリプト言語

お好みのスクリプト言語を選択すると、サンプルコードがその言語で表示されます。

Rigidbody2D.AddRelativeForce

Switch to Manual
public function AddRelativeForce(relativeForce: Vector2, mode: ForceMode2D = ForceMode2D.Force): void;

Parameters

relativeForce Components of the force in the X and Y axes.
mode The method used to apply the specified force.

Description

Adds a force to the rigidbody2D relative to its coordinate system.

力は X および Y 軸方向の別々の成分として指定され(2D 物理挙動では Z 軸方向がないことに留意)、オブジェクトは 力 = 重さ x 加速度 の法則に従って、加速が加えられ、重さが大きいほど特定速度まで加速させるのに、より多くの力が必要となります。 See Also: AddForceAtPosition, AddTorque, mass, velocity, AddForce, ForceMode2D.