Hello,
now I use two triggers, one for enter which show the hotspot and then one trigger for exit on the same place which hide the hotspot. I would like to have just one trigger and when I enter it makes some actions, when I leave it makes another actions.
I didn't find the solution here so far.
Thank you for any help.
Comments
I can imagine something like select in Trigger type: coutinuous or enter/exit and when I hit the enter and exit option there will be possiblity to assign action for each.
The script looks great, but still here is the error message: The script 'CustomTrigger.cs' must derive from AC's Action class in order to be available as an Action.
And how it works when I have assigned AC_trigger script in a Trigger, probably I need to use only AC_trigger or your solution, right?
Thank you so much for your patience, now it works well.
I don't know if there is a particular problem doing this, but I just added another AC_Trigger script to the Trigger object and set up that to handle exit.
For a little more detail I'll outline the steps:
1) Create a Trigger in the normal way
2) Setup the Trigger script to handle enter, and set up whatever scripts you like
3) Use Add Component, and select AC_Trigger
4) Setup the trigger script on the new Component to handle exit, and setup whatever scripts you like
I imagine there may be some objects that wouldn't handle this so well, but for my particular case (setting object visibility) it works a treat!