- Home /
Question by
Indie1940 · May 09, 2014 at 01:19 AM ·
programming-basicsjava to c#unity inputinput setting
Rotate function on c#
I want to do a Rotate function on c#.I try use transform.rotate neither java script,but i want to use get axis.What i can do?
I try: input = new Vector3(Rotate)(Input.GetAxis(rotate1),0,0)* velocity;
rigidbody.velocity = input;
I try:input = transfrom.translate(Input.GetAxis(rotate1),0,0)* velocity;
rigidbody.velocity = input;
I try:input = new Vector3 transform.translate(Input.GetAxis(rotate1),0,0)* velocity;
rigidbody.velocity = input;
HELP PLEASE
Comment
Answer by Maerig · May 09, 2014 at 02:29 AM
transform.Rotate(Input.GetAxis("Vertical"), Input.GetAxis("Horizontal"), 0f);
Do you mean something like this ?
Your answer
Follow this Question
Related Questions
Problems with FPS controller movement 1 Answer
Problems with FPS controller movement 0 Answers
Converting this JS code to C# 1 Answer
How to keep Text file going in different scenes? 2 Answers
Help With C# Debug 2 Answers