Legacy Documentation: Version 4.5.0

Script language:

  • JS
  • C#
  • Boo
Script language

Select your preferred scripting language. All code snippets will be displayed in this language.

Rigidbody2D.GetRelativePointVelocity

Switch to Manual
GetRelativePointVelocity(relativePoint: Vector2): Vector2;
Vector2 GetRelativePointVelocity(Vector2 relativePoint);
def GetRelativePointVelocity(relativePoint as Vector2) as Vector2

Parameters

relativePointThe local space point to calculate velocity for.

Description

The velocity of the rigidbody at the point Point in local space.

GetRelativePointVelocity will take the angularVelocity of the rigidbody into account when calculating the velocity.