- Home /
Question by
Lewaro · Feb 29, 2016 at 12:20 PM ·
animationscripting problem
Are Animator bloking scriptbased Rotation?
Hey, i got a 2D-figur wich should point his arm in the direction the 2nd joystick is facing. I wrote the following Script for that:
Vector2 aim = new Vector2(Input.GetAxis("Aim X"), Input.GetAxis("Aim Y"));
transform.rotation = Quaternion.LookRotation(aim);
Sadly ths doesn't appear to work. I think its because i used a Animator. I could be wrong thou. I even set the Animator to a animation in wich the arm is not affected, or at least not mentioned.
Any Ideas?
PS: for those who dont get the principle. In Starboud you kann use a flashlight in the direction of your mouse like this.
Comment
Your answer
