Unable to find any tutorial for interacting with an object to set a variable to true
-
Hi- I'm sorry if this has been answered before, but I couldn't find it anywhere. I went to the Godot discord but I haven't gotten a response and I've tried finding a tutorial on youtube, but they all either do not work, are outdated, assume you know everything, confusing or all the above.
I'm making my first game and I am trying to make it so that, when looking at an object that is interactable, pressing a keybind causes the object to change sprite and then sets a state variable for the player. I have already figured out ray casting to see where the player is looking and I already know how to detect that certain objects are being looked at, I just can't find a way to both:
A) Have a prompt under the crosshair saying "Press [E]"
and B) actually make the interaction.Help would be heavily, heavily appreciated