Garry's Mod Wiki

NPC:GetAimVector

  Vector NPC:GetAimVector()

Description

Returns the aim vector of the NPC. NPC alternative of Player:GetAimVector.

If the NPC has both NPC:GetEnemy and NPC:GetActiveWeapon, engine will automatically call ENTITY:GetAttackSpread to add random spread degrees to the return value.

Returns

1 Vector
The aim direction of the NPC, usually a noisy direction to it's NPC:GetEnemy. This will default to Entity:GetForward when there's no enemy. Thus, NPC:GetCurrentWeaponProficiency will be used.