ENTITY:OverrideMoveFacing
Description
Called to completely override the direction NPC will be facing during navigation.
This hook only exists for
ai
type SENTs.This hook is called by the default movement hook. Returning
true
inside ENTITY:OverrideMove will prevent engine from calling this hook.Arguments
2 table AILMG
Extra data for the movement. A table containing the following data:
- boolean hasTraced - The result if a forward probing trace has been done
- number expectedDist =
speed*interval
- The distance expected to move this think - number flags - AILMG flags
- number maxDist = NPC:GetPathDistanceToGoal - The distance maximum distance intended to travel in path length
- number navType - NAV enum
- number speed - Entity:GetSequenceGroundSpeed Note these need not always agree with
target
- Entity moveTarget =
m_hGoalEnt
- Target entity as goal. - Vector dir - The step direction, towards
target
- Vector facing - The direction NPC's body will turn during movement.
- Vector target = NPC:GetCurWaypointPos - Current waypoint in world coordinates.