+1 vote

Hi, I'm trying to animate collision polygon 2d using animaton player (in godot 2). With visible collisions turned on while running the game I can see polygon shape changing as expected, but collision detection doesn't update (stays as in frame 1). So far the only way around it that I found is making a new polygon for every time I want to change polygon shape. Is there a better way to do it?
Also, I found this tutorial where pixel perfect collision is achieved using masks. Can something similar be done in godot?

in Engine by (35 points)

Are you sure you set up your animation correctly? Are all the keyframes placed alright?

I'm pretty sure that the animation is done right, I've made around 20 in this one project and so far no problems with any other option, just the polygon shape (as I said, the shape changes but collision detection area doesn't update at all).

I got the same problem, too.
I'm working on a player's ability which is simply generating a black hole.
The animation goes like scale up from a tiny point and expand to a circle-shape.
I animated both sprites and shape2D, but it had no effect
(which absorb things to its center) until the expand animation ends.

I'm able to animate my collision polygons, and they (somewhat) work, but I've found that sometimes the polys are in the original place/shape despite being switched via script AND the polygon shapes are showing up as the animated version that I want when "Visible Collision Shapes" is checked. I think that this is a bug. (I'm still using Godot 2.15, BTW).

I also made sure to have the actual coordinate position set at exactly x 0, y 0 and only have my frames change the actual polygon point positions. Maybe there's a loop I've created where the Area 2d that is sending my collision signals is being bypassed -- hence why they work some of the time. My game will not work without animated polygons, so I'm stuck until I find a solution. (Hopefully I won't end up having to (re)learn C++ and fixing then compiling the durn engine from scratch, and it's just something I've overlooked or there's a workaround for it.)

Please log in or register to answer this question.

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.