Learn more about interaction machines and what you can use them for.

Interaction machines are Unity components that are added to game objects. They’re mostly used for game mechanics involving player interaction, like showing a dialogue when talking to a NPC.

An interaction machine component can be added through the components menu (Makinom > Machines > Interaction Machine) or the scene wizard (Add Machine > Interaction Machine). A game object with an interaction machine is represented in the Unity scene view by this gizmo icon:

InteractionMachineComponent Icon

You can learn more about machine components in general and their basic settings in this how-to.

Start Types

An interaction machine is started by player interactions, e.g. using the Interact Key or mouse/touch.

Interact

Started upon player interaction. The player can interact with game objects by pressing the Interact Key (defined in the Makinom editor: Base/Control > Game Controls > Interaction Settings).

A game object is available for interaction when it’s selected or within the player’s Interaction Controller trigger. You can learn more about interactions in this how-to.

Additional Start Conditions

The Interact start type can optionally be limited by the distance between the player and the machine’s game object. This can be used to only start the machine when within a defind range.

The default maximum interaction distance is defined in the Makinom editor (Base/Control > Game Controls > Interaction Settings) and can be overridden by each interaction machine individually. Setting the maximum distance to -1 will disable distance checks (default setting).

Example

This start type can be used to display dialogues with NPCs. Use a Show Dialogue node to display a dialogue or choice dialogue.

Key Press

Started upon the player pressing a defined input key. This can optionally be limit to only happen while the player is within the the trigger of the machine’s game object or while colliding with the machine’s game object.

Additional Start Conditions

The Key Press start type can optionally be limited by the distance between the player and the machine’s game object. This can be used to only start the machine when within a defind range.

The default maximum interaction distance is defined in the Makinom editor (Base/Control > Game Controls > Interaction Settings) and can be overridden by each interaction machine individually. Setting the maximum distance to -1 will disable distance checks (default setting).

Example

This start type can be used to show game menus. Use a Show Dialogue node to create menus (Choice dialogue type).

Mouse Down

Started when a mouse button is pressed down while the curser is over the machine’s game object. It’s implemented in the component’s OnMouseDown function.

Additional Start Conditions

The Mouse Down start type can optionally be limited by the distance between the player and the machine’s game object. This can be used to only start the machine when within a defind range.

The default maximum mouse click distance is defined in the Makinom editor (Base/Control > Game Controls > Interaction Settings) and can be overridden by each interaction machine individually. Setting the maximum distance to -1 will disable distance checks (the default distance is 3).

Example

This start type can be used to mark a clicked game object. Use a Spawn Prefab node to spawn a cursor prefab on the game object or a Change Color node to change the game object’s color.

Mouse Drag

Started when the mouse is dragged, i.e. while the button is held down after clicking on the machine’s game object. It’s implemented in the component’s OnMouseDrag function.

Additional Start Conditions

The Mouse Drag start type can optionally be limited by the distance between the player and the machine’s game object. This can be used to only start the machine when within a defind range.

The default maximum mouse click distance is defined in the Makinom editor (Base/Control > Game Controls > Interaction Settings) and can be overridden by each interaction machine individually. Setting the maximum distance to -1 will disable distance checks (the default distance is 3).

Example

This start type can be used to drag game objects through the scene by mouse. Use one of the Movement nodes (e.g. a Change Position node) to change the position of the game object – additionally, you can use a Raycast node to store the position of the mouse cursor in the scene into a Vector3 variable and use that to move the game object.

Mouse Up

Started when the mouse is released after clicking on the machine’s game object. It’s implemented in the component’s OnMouseUp function.

Additional Start Conditions

The Mouse Up start type can optionally be limited by the distance between the player and the machine’s game object. This can be used to only start the machine when within a defind range.

The default maximum mouse click distance is defined in the Makinom editor (Base/Control > Game Controls > Interaction Settings) and can be overridden by each interaction machine individually. Setting the maximum distance to -1 will disable distance checks (the default distance is 3).

Example

This start type can be used to mark a clicked game object. Use a Spawn Prefab node to spawn a cursor prefab on the game object or a Change Color node to change the game object’s color.

Mouse Up As Button

Started when the mouse is released while the cursor is over the machine’s game object after clicking on it. It’s implemented in the component’s OnMouseUpAsButton function.

Additional Start Conditions

The Mouse Up As Button start type can optionally be limited by the distance between the player and the machine’s game object. This can be used to only start the machine when within a defind range.

The default maximum mouse click distance is defined in the Makinom editor (Base/Control > Game Controls > Interaction Settings) and can be overridden by each interaction machine individually. Setting the maximum distance to -1 will disable distance checks (the default distance is 3).

Example

This start type can be used to mark a clicked game object. Use a Spawn Prefab node to spawn a cursor prefab on the game object or a Change Color node to change the game object’s color.

Mouse Enter

Started when the mouse cursor enters the machine’s game object. It’s implemented in the component’s OnMouseEnter function.

Additional Start Conditions

The Mouse Enter start type can optionally be limited by the distance between the player and the machine’s game object. This can be used to only start the machine when within a defind range.

The default maximum mouse click distance is defined in the Makinom editor (Base/Control > Game Controls > Interaction Settings) and can be overridden by each interaction machine individually. Setting the maximum distance to -1 will disable distance checks (the default distance is 3).

Example

This start type can be used to mark a game object by moving the cursor over it. Use a Spawn Prefab node to spawn a cursor prefab on the game object or a Change Color node to change the game object’s color.

Mouse Over

Started while the mouse cursor is above the machine’s game object. It’s implemented in the component’s OnMouseOver function.

Additional Start Conditions

The Mouse Over start type can optionally be limited by the distance between the player and the machine’s game object. This can be used to only start the machine when within a defind range.

The default maximum mouse click distance is defined in the Makinom editor (Base/Control > Game Controls > Interaction Settings) and can be overridden by each interaction machine individually. Setting the maximum distance to -1 will disable distance checks (the default distance is 3).

Example

This start type can be used to rotate a game object while the cursor is over it. Use one of the Rotation nodes (e.g. a Rotate node) to rotate the game object.

Mouse Exit

Started when the mouse cursor leaves the machine’s game object. It’s implemented in the component’s OnMouseExit function.

Additional Start Conditions

The Mouse Exit start type can optionally be limited by the distance between the player and the machine’s game object. This can be used to only start the machine when within a defind range.

The default maximum mouse click distance is defined in the Makinom editor (Base/Control > Game Controls > Interaction Settings) and can be overridden by each interaction machine individually. Setting the maximum distance to -1 will disable distance checks (the default distance is 3).

Example

This start type can be used to remove the marking of a game object. Use a Destroy Object node to destroy a cursor game object or a Change Color node to change the game object’s color back.