Animation, have transition affect only x or y and not both?

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By learis

Hello, I’m very new to Godot.

This Scenario
Under the transition section for editing individual keys for an animation, you have multiple options that deal with acceleration while your sprite moves from one keyframe to another (I’m speaking specifically for the position keyframes).

I’m doing a simple jump forward animation for my sprite. I choose the transition with the value of 0.25 as my sprite is initially jumping. Basically this will make him start his jump with fast momentum and slow down as he approaches the top, mimicking how gravity works.

The Problem
The problem however is that this causes both the x speed and y speed to slow down. So my sprite loses all of his forward momentum and freezes at the top of his jump. I need for only his y momentum to slow down, not his x.

Are there any further tools in the visual editor to allow me to do this? If not, I’m sure I can do this programmatically, but I like using the visual editor whenever possible.

:bust_in_silhouette: Reply From: eons

You can edit the track “path” and add :x or :y at the end, delete all keys and add again to get one of the correct type, you must use the key editor (bottom right button) to edit the key values.

This is going to be easier on 3.1 with the new inspector and animation player layouts.