- Home /
Move cursor/crosshair based on keyboard input
Hi,
I want to be able to draw a crosshair on screen and move it around based on input from the keyboard. I've tried googling this but I can't seem to come up with good word choice for it.
How would I go about doing something like that?
Answer by Reverend-Speed · Mar 29, 2011 at 09:31 PM
I'm no programmer (joined here today), but I'm guessing if you changed the scripts at the bottom of THIS page--
http://answers.unity3d.com/questions/32067/custom-cursor-how-does-it-work
--so it used commands like input.getaxis("Horizontal") etc from THIS page--
http://unity3d.com/support/documentation/Manual/Input.html
--you'd get something close to what you're looking for.
As I say, I'm a newbie here, so I can't give you exact code... but these definitely seem like good places to start.
Good luck!
PS: By the way, if you have the time, take a look at my question, see if you have any ideas - http://answers.unity3d.com/questions/49177/original-blender-character-faces-ground-when-not-walking
Your answer
Follow this Question
Related Questions
Creating A Crosshair in Unity 4.6.2? 4 Answers
How to move GUI elements like text in game (Like Star Wars Intro) 1 Answer
How to move a texture created from GUI.DrawTexture 1 Answer
2d Sidescroller Crosshair! 1 Answer
Gui problems. 1 Answer