0 votes

I have an object that will "wiggle" once on collision with others by slightly increasing and decreasing it's sprite's scale. I managed to create this effect in a simple AnimationPlayer node animation by setting the scale to (1, 1), (0.9, 0.9), (1.1, 1,1.) and back to (1, 1). The problem is that the object uses a custom 'size' variable to set the scale, so whenever I want it to wiggle it resets the scale back to 1. Is it possible to use this variable in the AnimationPlayer node to make this effect relative to the current object scale?

Godot version v3.2.3.stable
in Engine by (12 points)

1 Answer

0 votes

add track : property track : script_variables : size.

Add track is this PLUS icon in top left corner of animation player menu.

Or you can export your size variable and than You will see it in editor, so You can keyframe it

by (2,432 points)

Yeah I eventually figured out I could use exported properties in the AnimationPlayer and made a relativescale variable with a setter function in which I set the scale by multiplying the base size with the relativescale.

Thanks for the support anyways.

Welcome to Godot Engine Q&A, where you can ask questions and receive answers from other members of the community.

Please make sure to read How to use this Q&A? before posting your first questions.
Social login is currently unavailable. If you've previously logged in with a Facebook or GitHub account, use the I forgot my password link in the login box to set a password for your account. If you still can't access your account, send an email to webmaster@godotengine.org with your username.