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

スクリプト言語

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

Rigidbody.GetPointVelocity

Switch to Manual
public function GetPointVelocity(worldPoint: Vector3): Vector3;

Description

ワールド座標における、Rigidbodyオブジェクトの速度を取得します

GetPointVelocity は、速度を計算する時 Rigidbody の角運動速度 (angularVelocity) を取得します。

	// Prints the velocity of the wheel

	var point : Vector3;
	var velocity : Vector3;
	point = transform.InverseTransformPoint(Vector3(0, -.2, 0));
	velocity =  rigidbody.GetPointVelocity(point);
	print(velocity.magnitude);