-
Notifications
You must be signed in to change notification settings - Fork 11
Adding interactions
To be able to use Prairie's interactions a FirstPersonInteractor
component must be added to the player object. The easiest way to do this is to use Praire's Prairie Player
prefab. This can be found in the Prairie folder in assets, under framework->prefabs
. If you would like to use your own player, you can add the component FirstPersonInteractor
to it, either by searching for it in the add component menu, or finding it in the add component menu under Prairie->Player
(Need to double check that that is the right place, add gif of this?).
For the player to be able to 'see' interactions, the object holding the interaction must have a collider attached to it. These can be added through the add component menu.
There are 3 ways to add an interaction. The easiest would be to open the add component menu, and navigate to Prairie->Interactions
, where there all of the interactions are stored (with the exception of annotations and slideshows, which are stored under Prairie->Annotations
). Select the interaction you would like, and it will be added to the game object.
Interactions can also be added by searching the name of the interaction in the add component menu, or by navigating to Prairie->framework->scripts->interactions
in Unity's file explorer and dragging the script for your desired interaction onto the object.
A list of all available interactions can be found here.
Upon adding an interaction to an object (with the exception of annotations), a prompt component will also be added to that object. The prompt is the text that the player will see when mousing over an object they can interact with. Most interactions are auto-populated with a default value, but this value can be changed. If the prompt field is left empty, there will be no text displayed when a user looks at the object.
There is an option to make a prompt 'cyclic' by checking the cyclic prompt
box. This will show an extra text field, which allows for two prompts to be used on an object, where these prompts alternate every time the object is interacted with. This is especially useful in situations where the event would logically 'toggle' such as turning lights on and off, or opening and closing doors.
###Twine Node Prompts TODO