Garry's Mod Wiki

Revision Difference

Tool:UpdateGhostEntity#511857

<function name="UpdateGhostEntity" parent="Tool" type="classfunc">⤶ <description>⤶ Updates the position and orientation of the ghost entity based on where the toolgun owner is looking along with data from object with id 1 set by <page>Tool:SetObject</page>.⤶ ⤶ This should be called in the tool's <page>TOOL:Think</page> hook.⤶ ⤶ This command is only used for tools that move props, such as easy weld, axis and motor. If you want to update a ghost like the thruster tool does it for example, check its [source code](https://github.com/Facepunch/garrysmod/blob/master/garrysmod/gamemodes/sandbox/entities/weapons/gmod_tool/stools/thruster.lua#L179).⤶ </description>⤶ <realm>Shared</realm>⤶ <file line="101">gamemodes/sandbox/entities/weapons/gmod_tool/ghostentity.lua</file>⤶ </function>⤶ ⤶