- Home /
A script that will assign "q" and "e" to horizontal rotation of character?
I've been trying to do a script that will assign rotation or translation values of character movement left and right to the q and e keys, but have failed miserably in getting whatever I come up with to work.
I've also been trying to do the same using mouse click + mouse move to invoke rotation, but the script I write for that falls through as well, I'm frustrated trying to figure this thing out for several hours.
Please help, preferably Javascript is what I work with
Answer by aong152 · Apr 19, 2012 at 12:25 AM
Which part are you having trouble with - the input getting or the rotation-doing?
Input getting
if (Input.GetKeyDown ("q"))
print ("q");
For rotation, assuming your character never tilts, you can simply rotate around the y-axis.
Your answer
Follow this Question
Related Questions
rotation.y gets wrong data 1 Answer
Stand alone player 0 Answers
rotating an object so the face nearest another objects face is parallel 2 Answers
Select frame for Animation 1 Answer
Unity Car Tutorial Rotate Snippet Chaos 0 Answers