- Home /
GuiTexture as crosshair as scroll over to activate things
Hello,
I have been making my game and getting it all situated. Now, i'm at the place were I need Input.GetKeyUp(KeyCode.E) to work for me when my gui scrolls over something. I have had a idea about a pole sticking out of my character's face thats invisible as a 'ray' but it would be hard to use considering that colliders only last one frame. As for, and including, that single thing about frames is when i use Input.GetKeyUp(KeyCode.E) it might not work.
The gui is at the direct center of the screen. I'm at a lost.
Answer by Piflik · May 11, 2012 at 06:14 PM
Make a raycast on GetKeyUp down the center of the screen, and when it hits you use the item that your crosshair is hovering over (the item the ray hits).
So basically you want us to provide the finished code for you.. Do you know how to check for Get$$anonymous$$eyUp and how to create a raycast? If you do then just write the code, if you don't then search google, unity's script reference and this site. Is there a specific part that you'd like help with?
no explain what it is... are people really that stupid?
If you want someone to write your game for you, maybe you should consider employing a competent programmer. If you want help on this site, you need to stop being rude to everyone who answers your questions.
Im sick and tierd of you following me. Stay off troller.
As for the people who do want to write the game for me, stay off too.
I'm asking a simple question and getting answers that deal with otherworldly things.
I'm not being rude. Well... who the fuck cares. Come at me.