ENTITY/CalcAbsolutePosition

From Garry's Mod
(Difference between revisions)
Jump to: navigation, search
m (vie -> via)
(Notes about calling behaviour)
 
Line 3: Line 3:
  
 
Like {{HookFunction|ENTITY|RenderOverride}}, this hook works on any entity (scripted or not) it is applied on.
 
Like {{HookFunction|ENTITY|RenderOverride}}, this hook works on any entity (scripted or not) it is applied on.
 +
 +
{{Note|If EFL_DIRTY_ABSTRANSFORM is set on the entity, this will be called serverside only; otherwise, this will be called clientside only. This means serverside calls of {{ClassFunction|Entity|SetPos}} without the EFL_DIRTY_ABSTRANSFORM flag enabled (most cases) will be called clientside only.}}
 +
 +
{{Note|The give concommand will call this hook serverside only upon entity spawn.}}
 
|Realm=Shared
 
|Realm=Shared
 
|Predicted=No
 
|Predicted=No

Latest revision as of 08:59, 13 November 2019

 ENTITY:CalcAbsolutePosition( )

Contents

Description

Called whenever the entity's position changes. A callback for when an entity's angle changes is available via Entity:AddCallback.

Like ENTITY:RenderOverride, this hook works on any entity (scripted or not) it is applied on.

NOTE

If EFL_DIRTY_ABSTRANSFORM is set on the entity, this will be called serverside only; otherwise, this will be called clientside only. This means serverside calls of Entity:SetPos without the EFL_DIRTY_ABSTRANSFORM flag enabled (most cases) will be called clientside only.

NOTE

The give concommand will call this hook serverside only upon entity spawn.

Arguments

Vector pos

The entity's actual position. May differ from Entity:GetPos

Arguments

Angle ang

The entity's actual angles. May differ from Entity:GetAngles

Returns

Vector

New position

Returns

Angle

New angles
Personal tools
Navigation