I’m producing this thread to essentially throw in some graphs from time to time of some cool stuff, I’ve come up with, and implemented in some of the maps I’ve been working on. Some of it is a mix and match of other information and some enhancements on my end. Feel free to ask stuff and i’ll try to help.
This graph is essentially a way for objects to always face towards a player, It’s more ideal for 2D meshes to give them a faux 3D impression. e.g. Lights. It’s set to the object you wish to have facing the player but may have other applications too, e.g. you can change the instance to any game object in a public variable.
Advanced object interactions:
This one comes in 2 parts. It’s designed to use a timer based system to create interactivity with objects on the map, think of a door that automatically opens when you collide into it, or a chest that might open then close when you click on it, it’s designed to give the elements around you a more detailed flow. Credit goes to Momo for the timer basis.
In this situation the player interacts with the chest object which is using a box collide (Trigger) starting the process. This sets a base time from the counted time and long how should pass before running the ending sequence. Generally as you’ll likely want to target sounds to make Open/Close it, as well as change the values of the animator it’s worth setting these to public. The animator itself targets the animator parameters you’ve set to change. In this case on or off.
Before playing any sounds and then waiting until the timer comes back as true for the duration and ending it. Ideally you’ll want to plan your duration around your animation frames.
You can also change this graph slightly for doors.
In this case the two major changes are to use a on enter trigger and a box collider disable on trigger which re-enables after the timer which closes the door. This way you can fake the idea of walking into a door to open it. It’s also worth noting if doors do transitions between maps, you might want to use a animation reset on the door of your arrival location. What is important however is it’s ideal to run both of these graphs locally, to avoid spam sound/animations in your world, TheHelpfulHelper has a guide on how to achieve that which helped me get things locally working on doors. Player Collision in Udon [OBSOLETE]
Edit: ammended doors to new player trigger.
I’ll post some more later on. Let me know if you come up with more effective ways to use this stuff!