Revision Difference
PhysObj:LocalToWorld#565526
<function name="LocalToWorld" parent="PhysObj" type="classfunc">
<description>
Translates a vector in the local space of the physics object into worldspace coordinates.
<note>Internally transforms the vector by the `PhysObj:GetPositionMatrix()`'s rotation & translation.
So in GLua it approximates to:
```
local matrixWorldTransform = PhysObj:GetPositionMatrix()
local vecWorldspaced = Vector()
vecWorldspaced:Set( vecLocal )
vecWorldspaced:Mul( matrixWorldTransform )
return vecWorldspaced
```
</note>
</description>
<realm>Shared</realm>
<args>
<arg name="vecLocal" type="Vector">A vector in the physics object's local space.</arg>
</args>
<rets>
<ret name="" type="Vector">The corresponding vector in worldspace coordinates.</ret>
<ret name="" type="Vector">The correspondent worldspace vector.</ret>
</rets>
</function>
Garry's Mod
Rust
Steamworks
Wiki Help