Hi all, I've been trying to find a way to have a button on a wall, but everything I've found when searching for 'button' seems to be going on about gui buttons, which I don't want.
Basically, I want to have a button on the wall, and when the player is near it and presses, say, enter, something happens.
If anyone has some info or links on how to do this, it would be greatly appreciated.
EDIT: Sorry, should have been clearer. It would be nice to have the player face the button to use it if possible. For now I'm using the vector3 distance thing (with the player only having to be in range). Thanks for the input so far :-)
You need to use a combination of Input to get player input, Raycast to detect what the player is looking at (or OnCollisionEnter / OnTriggerEnter, or simple Vector3 distance), and an actual GameObject for the button. If you have more specific questions feel free to elaborate.