Revision Difference
Entity:LocalToWorld#565520
<function name="LocalToWorld" parent="Entity" type="classfunc">
<description>Converts a vector local to an entity into a worldspace vector</description>⤶
<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">The local vector</arg>⤶
<arg name="lpos" type="Vector">A local space vector.</arg>⤶
</args>
<rets>
<ret name="" type="Vector">The translated to world coordinates vector</ret>⤶
<ret name="" type="Vector">The correspondent worldspace vector.</ret>⤶
</rets>
</function>
<example>
<description>Produces a worldvector 100 units in front of the center of the entity, taking into account the entity's angle</description>⤶
<code>return ent:LocalToWorld(Vector(100,0,0))</code>
⤶
</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>
Garry's Mod
Rust
Steamworks
Wiki Help