C4 Engine Terathon Software C4 Engine API Documentation

• Controller System

API Links
Developer Links

Controller::HandleInteractionEvent

Defined in:  C4Controller.h
Called to handle an event for an interactive node.
Prototype

virtual void HandleInteractionEvent(InteractionEventType type, const Point3D *position, Node *activator = nullptr);

Parameters
type The event type. See the list of possible events below.
position The position, in the target node's local coordinate system, where the event occurred.
activator The node that caused the event to occur.
Description
The HandleInteractionEvent function is called when an event needs to be handled for an interactive node. The type parameter specifies the type of event that occurred and can be one of the following values.
kInteractionEventEngage The user has begun looking at an interactive object.
kInteractionEventDisengage The user has stopped looking at an interactive object.
kInteractionEventActivate The user has explicitly activated an interactive object (e.g., with a mouse click).
kInteractionEventDeactivate The user has released the input control used to activate an interactive object.
kInteractionEventTrack The user has changed the interaction position.