A tooltip and an interaction system


So I got the task of making tooltips and some kind of interaction system. I have never done something so I initially thought that it would be hard, but it turned out to be pretty easy.

For the tooltip, I created a text object that is only shown when the player enters the trigger of the object holding the trigger.

This was pretty easy. When I created that, I realized that I could use a similar approach to create an interaction system to create an input check while the player is inside the trigger. Using the events system in Unity, I created a slot in the inspector so we can select a function that would run when the player is interacting with the object. This allows us to create any type of interaction system. I also made a dialogue system with the interaction system, but the one I made was a simple message cycler, but given the flexibility of the code (which I aim for at this stage) makes everything easy to build upon.


Leave a Reply

Your email address will not be published. Required fields are marked *