Garry's Mod Wiki

NPC:SetIdealYawAndUpdate

  NPC:SetIdealYawAndUpdate( number angle, number speed = -1 )

Description

Sets the ideal yaw angle (left-right rotation) for the NPC and forces them to turn to that angle.

Arguments

1 number angle
The aim direction to set, the yaw component.
2 number speed = -1
The turn speed. Special values are:
  • -1 - Calculate automatically
  • -2 - Keep the previous yaw speed