Table of Contents

Class NPCLookAtInteractorAction

Namespace
FishMMO.Shared
Assembly
FishMMO.Shared.dll

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

initiator ICharacter

The character interacting with the NPC.

eventData EventData

The event data containing the interaction context.