- Home /
fbx animation beats script animation?
I've made an animation where a charakter walks and holds a weapon with his hand. Then I wanted to move the hand up and down with a script so the arm angle is always the angle, where the camera looks. Unfortuntely, it didn't work well. Unity can't decide what it should make, fbx or script? So the arm jumpes around. How can I solve it?
var cam: Camera;
var Arm : Transform;
function Update () { transform.rotation=Quellobjekt.transform.rotation; Arm.Rotate(50,0,0); }
Answer by Mike 3 · Feb 13, 2011 at 02:50 PM
Set the rotation in LateUpdate instead of Update, as animations are done between the two functions
Answer by coffiarts · Feb 21, 2013 at 10:42 PM
Just a brief addition: Keep in mind that even with the LateUpdate() solution described, there can be another problem arising when propagating the bone rotation over RPC in a network game. In such cases the result will be a weird "bone flapping" due to network lag. But this can easily be worked around with the solution described here:
http://answers.unity3d.com/questions/126368/how-to-rotate-a-bone-during-an-animation.html (follow the comments by Owen Reynolds)
Your answer
Follow this Question
Related Questions
orbit mouse camera animation movement script 1 Answer
Camera freezes when in bone hierarchy 1 Answer
Rotate cam with object, smooth boost and brake 3 Answers
animation & position problem 0 Answers
cant stop my animation 0 Answers