Garry's Mod Wiki

Entity:LocalToWorld

  Vector Entity:LocalToWorld( Vector lpos )

Description

Converts a vector local to an entity into a worldspace vector

Arguments

1 Vector lpos
The local vector

Returns

1 Vector
The translated to world coordinates vector

Example

Produces a worldvector 100 units in front of the center of the entity, taking into account the entity's angle

return ent:LocalToWorld(Vector(100,0,0))