- Home /
Animation rotation problem.
I have an animation problem. My scene consists of a an FPS controller and a simple "hammer" (2 cylinders). I have a script that allows me to pick up objects HL2 style. I set a very basic animation for the hammer, tween 90 degrees, but when I play the game, the hammer rotates using it's starting direction rather than current direction. I have tried putting the object into an empty game object but that just makes things worse (weird random nonsensical jerking motions). Any help would be nice.
You must have animated it in the world. Can you try animating it locally? If you animate it in Unity, it'll do that because the keyframes won't be relative to the object but using world coordinates.
It's currently the child of an empty Game Object to which the animation is attached.
@ Hyperion, what does "animated it in the world" mean exactly. I used the Unity built in animation editor.
It means that the exact position and direction of the hammer was saved during the first key frame ins$$anonymous$$d of saving just the rotation. Saving the direction would mean the animation always looks one way ins$$anonymous$$d of your desired direction, and that 'one way' is the direction with which you first animated it.
Your answer
![](https://koobas.hobune.stream/wayback/20220613113312im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
Issue with rotation of an animation 1 Answer
Help: Making an object face a target 2 Answers
How do you change the pivot point of a group? 1 Answer