- Home /
Text appear on screen when I stand over object.
let's say i have a plane. Let's just call it "floor". I want text to popup sort of like a button. I know how to do part of this. BUT I NEED IT TO CONSTANTLY CHECK F I AM OVER THE "Floor". I prefer javascript. TY in advance
This question in its current form is not suitable for Unity Answers.
Please Read This : http://answers.unity3d.com/page/newuser.html
You should Watch : http://video.unity3d.com/video/7720450/tutorials-using-unity-answers
And search engine : http://www.lmgtfy.com/?q=unity+check+if+touching+the+floor
Dude leave the guy alone alright don't down vote him, his questions deserve to be heard.
Answer by Garth-Smith · Mar 13, 2013 at 09:37 PM
I use C#, so I can't write any code for you. I would suggest two options.
Use a trigger collider on the area above the floor and use the OnTriggerEnter() & OnTriggerStay() functions.
Put a collider on the floor itself and then raycast downward and check for a hit. http://docs.unity3d.com/Documentation/ScriptReference/Physics.Raycast.html
Your answer
Follow this Question
Related Questions
How can I add "..." to GUI.Label if it goes past its bounds? 1 Answer
Checking 2 string variables 0 Answers
How to make text that scrolls horizontally? 2 Answers
Story Text to GUI Boxes 0 Answers
Trying to make an ASCII UI based game 0 Answers