I am working on a project where a button is located far away from the elevator. Once the button is clicked (OnMouseUp) the elevators animation is activated.
I want to know how would I shorten the distance the mouse requires to activate the buttons script.
In the Image 1 below, I want it where my character must be within a few feet in order for the script to activate, but as of now Image 2 shows that even that far away I can click the button and the elevator moves.
Also would this way shorten the range for all the Mouse events such as OnMouseOver and OnMouseExit?
IMAGE 1:
![alt text][1]
IMAGE 2:
![alt text][2]
Heres my code:
function OnMouseUp() {
elevator.animation.Play("Elevator");
}
[1]: /storage/temp/53521-unity-closebutton.png
[2]: /storage/temp/53522-unity-farbutton.jpg
↧