I am trying to play an animation when a scene is instanced. It is a simple animation that translates y from -5 to 5. The animation plays but it plays at x = 0 and z = 0. I understand this is because the translation values for the respective co-ordinates in the animation are set to 0. I have a spatial node on my player scene that can grab transform info and pass it on to my animated scene, but I do not know how to dynamically change the x and z values of the key frames in script.

If x and z don't need to be animated, simply don't key them. Key only y. That way you can freely set x and z to any value and animation will not interfere with them.

@xyz said: If x and z don't need to be animated, simply don't key them. Key only y. That way you can freely set x and z to any value and animation will not interfere with them.

How do I key only the y-value?

Make a translation track as usual. Before adding any keys, double click on the track name and type :y at the end, so it becomes translation:y. Now you can add keys that will affect only translate.y property. Of course, you can do the same for x and z, if you want to animate them separately.

@xyz said: Make a translation track as usual. Before adding any keys, double click on the track name and type :y at the end, so it becomes translation:y. Now you can add keys that will affect only translate.y property. Of course, you can do the same for x and z, if you want to animate them separately.

Works perfectly, thanks sm!!!

a year later