Garry's Mod Wiki

Revision Difference

Entity:LocalToWorld#565640

<function name="LocalToWorld" parent="Entity" type="classfunc"> <description>Translates a vector relative to the entity's coordinate system into a worldspace vector.</description> <realm>Shared</realm> <args> <arg name="lpos" type="Vector">A local space vector.</arg> </args> <rets> <ret name="" type="Vector">The correspondent worldspace vector.</ret> <ret name="" type="Vector">The corresponding worldspace vector.</ret> </rets> </function> <example> <description>Produces a worldspace vector 100 units in front of the position of the entity, taking into account the entity's angles.</description> <code>return ent:LocalToWorld( Vector( 100, 0, 0 ) )</code> </example>