Hey everyone, I’ve made few simple trigger graphs that I’ve made for my world which I want to share to help others like me (with no experience in coding).
Now I will list few things to make your trigger work correctly.
- Create Cube with checked “Is Trigger” in box collider section,
- Add Udon Behaviour in “Add Component” section.
- Disable “Mesh Renderer”.
- In Udon Behaviour section place your Game Object that you want to enable/disable.
- When you place your cube make sure it’s high enough to interact with player.
My main graph (Multi time use) OnTriggerEnter with OnTriggerExit It will Turn On Game Object when you enter the collider then it will Turn it Off after you leave the trigger zone.
Keep in mind this graph will always try to Turn On the object first that’s why you should keep game object off when you set it in your world.
OnTriggerEnter Off (Single Use Trigger)
OnTriggerEnter On (Single Use Trigger)
Last Graph is similar to the first but it will detect if the object is already On or Off (Useful when several players stands on 1 collider) At least it looks like it doing it haha.
I hope it will help someone with his/her world ;]. Remember I have no idea what I’m doing but the graphs are working for me in the way I wanted them to work, so that’s a small achievement for me. If any1 have questions or suggestions feel free to ask, I will try to help.