- Home /
Question by
salvabervi · Feb 07, 2014 at 04:30 PM ·
objectrotatedirectionjoystick
rotating object joystick rotation direction current object independently
All respondents found here related to my question no get what I want. I need to rotate an object in the direction of joystick initially angles of the object is zero and if I move the joystick horizontally or vertically right turns but when you change the rotation no longer follows the direction of the joystick, I need regardless of the angle rotation that already has the object continue turning horizontally or vertically, is in the rotation that is currently subject.
The code does not work properly:
function Update() {
transform.Rotate(Vector3(-Input.GetAxis("Vertical")*0.5,0,Input.GetAxis("Horizontal2")*0.5));
}
Thank you very much in advance.
Comment
Your answer
Follow this Question
Related Questions
Rotating character based on joystick angle, at an angle 0 Answers
Camera rotation around player while following. 6 Answers
How to rotate an object once? 2 Answers
Settings Menu 0 Answers