Today we made a room in Unity before placing a key and a door. The main task was to allow the door to be opened by using a C Sharp Script.
After previously having a code that made the door disappear when the player hovered their cursor over the key, this code rotates the door which gives the impression of it being opened when the player clicked the key.
We then went on to write this code
which displayed text when you hovered over certain objects. For example, when the player hovered over the key the game would display “Key” in the corner.