BUMP Seemingly simple Animation question -- one POSITION axis only?

Nobody knows the answer to this decisively??? That’s amazing!


Using unity’s animator,

let’s say you are ONLY animating the POSITION.

To repeat, again … you are ONLY animating the POSITION.

Within the POSITION … is it possible to ONLY affect the Y value?

I want it to completely ignore the other two POSITION axes.

(So: those other two values could well be changed BY OTHER SYSTEMS, during the animation.)

(TO BE CLEAR … if you simply “leave X and Z alone”, THE ANIMATOR DOES NOT LEAVE THEM ALONE, it continuously SETS THEM TO ZERO during the animation, so any Other Processes you have which change x and z get buggered)

So quite simply, can you “turn off” some of the three axes in the POSITION of the animator?

Once again, my problem is that I want to “TOTALLY NOT AFFECT” the x and z axes of the POSITION. At the moment if you “don’t touch them” the animator “constantly sets them to zero”.

{Obviously the other way to do this is simply add an empty wrapper object and animate only the X value, and I’m happy to do that. But what is the answer to this question?}

PS this is an outstanding opportunity to demonstrate that you can spell the plural of axis correctly! :slight_smile:

Wolfram’s answer is partially correct, in that you can select and delete the keyframe(s) for an individual axis in the Dope Sheet view.

But based on my testing here locally, using both the legacy Animation component and the new Mechanim based Animator component, no keyframes has the same effect as a keyframe at a value of zero.

I would call that a bug, so I just filed one. (Case 596665) Really seems like the default behavior should be to not change the existing value of curves that do not have keyframes.

So . . . the answer to this question seems to be “no”. Sadly.

Open Animation, select a keyframe, click on the diamond shape of the list entry that you don’t want to have animated, select “Delete Key”. Repeat for all keyframes.

You can animate an x,y or z axis via an .anim file with the Animator component but it animates on the world axis and not the local axis. This needs to be improved by the creators of Unity.

I write this because I interpreted your question as just say a head bobbing forward and back in a topdown for running. This would be on the forward axis (usually z but sometimes y). However if the character rotated, the local forward axis for the character’s head has changed however the .anim file will continue to animate the head movement on the world axis. Very poor functionality. Needs to be improved so local position is an option ASAP.