hello i am really new to unity and i have a simple game up and running but i am now trying to add triggers to check certain things. it’s a linear race game along a fixed course, you can only change speed. i have a speed readout displayed in a txt object on the ui. i am wondering how to add triggers that will reference this readout, for example if you are going over 60mph it would display a sprite on the UI saying slow down, and if you were doing a reasonable speed it would say good speed or something like that. I would make the images it would just be the logic of how to go about it that is eluding me. i am just putting trigger objects on the course that the player passes through but i don’t understand how to reference the text value. is there a simple trigger function that i am missing somewhere? again this is not something i am remotely familiar with i am sure it must be really obvious
The most basic is this:
https://www.youtube.com/watch?v=IvHqAzhIDSE
Obviously you need to read the object’s velocity, its magnitude will give you its speed.