Garry's Mod Wiki

PhysObj:WorldToLocalVector

  Vector PhysObj:WorldToLocalVector( Vector vec )

Description

Transforms a worldspace vector into the local space of the physics object merely by the rotation of the inverted PhysObj:GetPositionMatrix().

In contrast to PhysObj:WorldToLocal, this function doesn't translate the vector.

Arguments

1 Vector vec
A worldspace vector.

Returns

1 Vector
The result vector of the transformation by rotation.