|
Is there an easy way to have a GUI Button show up over a game object? I'm aiming for various items on a desk that have writing on them saying what will happen if the user clicks on them. (E.g. keys for "Shop", paper for "Write".) I was hoping this would be simpler than making the objects clickable and just positioning GUITextures over them.
(comments are locked)
|
|
You can ask the camera where any point in world space will be in screen space. Try this to get a feeling (untested code, might contain errors): Thank you very much. Although I'm mainly a javascripter, you've definitely put me on the right track. I'll need to do a little more tweaking to get it working just right, but at least I now know what I have to do. Thanks again!
Mar 01 '11 at 04:38 PM
Orandze
hi, i didnt understand where do i have to subtract the the point.y im nbot sure if im using scree height i have this: ****** I've tried change the screen height that appears in the code but, that is for some other static GUI buttons. And one more question, how do put a position for example if want that the GUI button follow the object but in a specific position (a square object and the GUI button follow it but always in the corner) appreciate the help!
Jul 09 '12 at 02:43 AM
octaviomejiadiaz
(comments are locked)
|
|
(comments are locked)
|
|
hi, i didnt understand where do i have to subtract the the point.y im nbot sure if im using scree height i have this: ****** I've tried change the screen height that appears in the code but, that is for some other static GUI buttons. And one more question, how do put a position for example if want that the GUI button follow the object but in a specific position (a square object and the GUI button follow it but always in the corner) appreciate the help!
(comments are locked)
|
