Garry's Mod Wiki

PhysObj:WorldToLocalVector

  Vector PhysObj:WorldToLocalVector( Vector WorldVec )

Description

Rotate a vector from the world frame to the local frame of the physics object.

This function only rotates the vector, without any translation operation.

Arguments

1 Vector WorldVec
A vector in the world frame

Returns

1 Vector
The corresponding vector relative to the PhysObj