- Home /
Question by
Zappedeccio · May 14, 2019 at 08:24 AM ·
animationrotationanimatoreuleranglesarmature
Armature stuck on a single side after an animation
Hi! I have a problem with the armature of a character... Every animation had no rotation modifier for the armature but this morning I added one, and now it's stuck on a single side. There are two "Sides", the one when you're going left and the one when you're going right. But even when there's no rotation modifier in the animation it doesn't rotate... Here are some screenshots and code. The character and its armature: Script applied to the armature only:
void Update() {
if (Input.GetKey(KeyCode.RightArrow))
{
transform.rotation = Quaternion.Euler(-90, 135, 0); //Right side
}
if (Input.GetKey(KeyCode.LeftArrow))
{
transform.rotation = Quaternion.Euler(-90, 135, 85); //Left side
}
}
Every animation for the character (Only "ChipGet" has a rotation modifier for the armature): I was wondering if the animations would play if I moved the armature in an empty game object to apply the rotation script to this one... Can someone help me please?
Comment