Skip to content

NPC move

This NPC move community component allows a non-player character (NPC) to move when triggered. Attach this component to an NPC in the scene. To make an object an NPC, in Studio go to + Feature>Gameplay, then find and add the NPC feature to your object.

Note: To enable your NPC to walk more intelligently and navigate around obstacles in the scene, you can bake a NavMesh. For more information, see NavMesh area.

This component includes:

Property Description
Speed Determines the movement speed of the AI NPC
Path orientation Determines how the waypoints align with the NPC's position and rotation. If set to World, the waypoints' starting position aligns with the current position of the NPC, while their rotation remains unchanged. Conversely, if it is set to Rotate with NPC, the waypoints' initial rotation matches that of the NPC.
Coordinate Specifies the point coordinates for the AI NPC to reach.
Stay time The time that the object stays when it reaches the point
Emit event Enter the name for the event to be emitted when the AI NPC reaches the point.
Move No. Specifies the number of movements
Type Determines the loop type, either One-way or Two-way. If you choose One-way, the AI NPC always moves in the same direction. If you choose Two-way, the movement direction changes to the opposite whenever the previous movement finishes.
Condition Determines the condition of the AI NPC movement:
  • Auto play, the AI NPC moves automatically
  • Event, the AI NPC moves when a specific event occurs
Event name Specifies the trigger event name for the movement. For example, it can be entered as registered in the AiGameEventRelay component. This field is only visible for the Condition is set to Event.