How do I affect the CollisionShape parameters with AnimationPlayer?

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

I’m trying to make the CollisionShape update it’s shape and size with every frame of animation. I’m new to this so I don’t really understand any intermediate language, but I read that with AnimationPlayer, I can set any parameter of a CollisionShape. How? Where do I go? Is it in the Inspector somewhere? Does it require code? What kind of code?

:bust_in_silhouette: Reply From: Caresle

Sorry for my english.

You can do that with the next steps:

1- Select your Animationplayer node.
1.5- (Create the animation if you don’t have yet)
2- Select CollisionShape node.
3- In the inspector tab you can now see a little key next to all the propierties.
4- Select shape for see the collision dimension it self.
5- Now click in the key next to shape and the name of the propierty what show in the step 4.
6- Now in your animation in animationplayer node you can see a little diamond around the time line.
7- Move around the animation and change the propierties with the values that you want(don’t forget click in the keys for save in the animation)
8- In your code only call the method play of animationplayer.
Something like this:

:bust_in_silhouette: Reply From: davidoc

You can do it from the editor, no need to write code. In the animation player add a new animation and then select the node with the properties you need to animate. You’ll see a key icon aside the property, clicking it will allow you to create a track to animate that property.
The latest documentation (not stable) has a good tutorial, just be aware some features may not be available in version 3.2.x:
Animation tutorial