Class NPCLookAtInteractorAction
ECA action that makes an NPC face the interacting player and transition to idle state. Add this to any NPC's OnInteractTriggers alongside the primary interaction action (e.g., SendMerchantBroadcastAction) to achieve the classic "NPC turns to greet the player" behaviour.
[Serializable]
public class NPCLookAtInteractorAction : BaseAction, IAction
- Inheritance
-
NPCLookAtInteractorAction
- Implements
- Inherited Members
Methods
Execute(ICharacter, EventData)
Rotates the NPC toward the interacting player and transitions its AI to idle. No-op on the client (server-only AI state).
public override void Execute(ICharacter initiator, EventData eventData)
Parameters
initiatorICharacterThe character interacting with the NPC.
eventDataEventDataThe event data containing the interaction context.