- Home /
When I hit play the character rotates
Hi! I am new to unity. I created a character in blender and i imported it to unity. On scene it looks like this:
I added movement and third person view before knowing that this happens... Now even if i turn all of them off it stills rotates when i press play:
If I uncheck the animator it doesn't rotate... Any idea why this happens or how i could solve it?
Answer by hameed-ullah-jan · Jul 05, 2018 at 05:48 PM
HI, what I'm getting is that you have Animator component attached to your game object, if you don't need this component, remove this component. hope this will solve your problem
Answer by Papouc · Jul 04, 2018 at 10:16 AM
I cant help you with explaing why is this happening but easy fix could be to simpy rotate it back :
void start { transform.eulerAngles = new Vector3(transform.rotation.x, transform.rotation.y + some correct value, transform.rotation.z); }
hopefully it helps
Hi! Thanks for trying to help me... Now it doesn't rotates! :) But still, when i press to go forward on my keyboard, it goes, but the animation acts like it is going in other direction. Any idea for that?
Hello, you can try to perform this corection every frame so just put this code inside your Udate method and every it will remove rotation right after it appears. i think that this should also fix your problem with animation. If mot you can just try other movment method because its very likely that this is some issue in your script.
I just found out that something is wrong with my animations. I will try to fix it now. Thanks for help anyway :)