Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add to support ping-pong loop in AnimationPlayer and playing backwards and ping-pong loop in NodeAnimation of AnimationTree #2664

Closed
jtakakura opened this issue Apr 29, 2021 · 5 comments
Milestone

Comments

@jtakakura
Copy link

jtakakura commented Apr 29, 2021

Describe the project you are working on

A 2D and 3D platformer project.

Describe the problem or limitation you are having in your project.

I would like to have the feature to play the ping-pong loop in AnimationPlayer and NodeAnimation of AnimationTree.

Describe the feature / enhancement and how it helps to overcome the problem or limitation

Currently, we need to set loop-back keyframes of animation by hand.
This feature can be eliminated in such complicated animation settings.

current
In the above case, we need to set 10 keyframes from 0.55 sec to actualize the ping-pong loop animation.

Describe how your proposal will work, with code, pseudo-code, mock-ups, and/or diagrams

Mockup :
pingpong

Add animation loop selectable button like loop wrap mode in the track setting.

If this enhancement will not be used often, can it be worked around with a few lines of script?

it could be done by hand but isn't as clean of a solution as it would be required for every ping-pong animations.

Is there a reason why this should be core and not an add-on in the asset library?

This seems like a feature that should be standard and everyone would use.

@Seubmarine
Copy link

The Animation player does have a play_backward function, but yeah it would be great to have it inside the editor has an option.

@TokageItLab
Copy link
Member

TokageItLab commented Apr 29, 2021

The AnimationPlayer has a play_backward() function, but certainly the NodeAnimation in the AnimationTree does not have a play_backward option. Also, like the PR I posted before, Godot 3.x does not allow NodeTimeScale's value to be negative. So, I favor this proposal expands on the PR.

@akien-mga
Copy link
Member

Fixed by godotengine/godot#48332.

@Zireael07
Copy link

... which was then reverted, pls reopen?

@Calinou Calinou reopened this Oct 12, 2021
@TokageItLab
Copy link
Member

It has been re-implemented by godotengine/godot#53819

@Calinou Calinou closed this as completed Nov 9, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants