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

Make animation preview not affect default values in inspector #3621

Closed
POWERUPT opened this issue Dec 1, 2021 · 3 comments
Closed

Make animation preview not affect default values in inspector #3621

POWERUPT opened this issue Dec 1, 2021 · 3 comments

Comments

@POWERUPT
Copy link

POWERUPT commented Dec 1, 2021

Describe the project you are working on

I am working on a Punch-Out style game that will be on Steam in the future that is driven pretty much entirely by the animation player. Every action as an animation associated with it, and so things are timed in sync with them, values from scripts and some functions that are called are put into the animations.
image

Describe the problem or limitation you are having in your project

The animation editor is really great, but the issue is that, when editing an animation, the editor shows the animation with the scene that you are working with. This makes sense in theory, but when a keyframe is selected when variable from a script is changed, or a kinematic body is moved, or a hitbox is enabled, it will stay that way even when you deselect the animation player, and will even be there for runtime.
I can't count the times that I clicked the animation player node for the player, and the first alphabetical animation is queued up, which is the one time the Boolean for countering is true, then I play the game and the player counters every attack.

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

At the very least, the state for the node(s) that's being animated should be saved then restored when the animation editor is closed.
It would be great if there was a separate window that opened that previewed the animation in a contained fashion. The nodes are instanced in a new window, and their values can be manipulated, and when the window is closed, nothing is altered.

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

image
image

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

I think this addition will be used a ton by anyone who uses the animation editor.
It may take more than a few lines of code though.

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

Although it is not a bug, it definitely addresses a sizeable design flaw with the animation editor. This mends an annoyance that has cost me quite some time with my development.

@Calinou
Copy link
Member

Calinou commented Dec 2, 2021

This is already implemented in Godot 3.4 with reset tracks: godotengine/godot#43115

If you upgraded from a previous Godot version, you will have to remove and recreate your animation s' tracks and ensure Create RESET Track is checked in the dialog that appears when you click the keyframe icon in the inspector. (It's checked by default.)

@Calinou Calinou modified the milestone: anim Dec 2, 2021
@KoBeWi
Copy link
Member

KoBeWi commented Dec 2, 2021

If you upgraded from a previous Godot version, you will have to remove and recreate your animation s' tracks

The RESET tracks can be created manually. Just add animation called RESET and keyframe any default value you want to have.

@POWERUPT
Copy link
Author

POWERUPT commented Dec 2, 2021

@Calinou Ah, I didn't see that was in there already. Thanks for pointing it out!

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

3 participants