The Godot Q&A is currently undergoing maintenance!

Your ability to ask and answer questions is temporarily disabled. You can browse existing threads in read-only mode.

We are working on bringing this community platform back to its full functionality, stay tuned for updates.

godotengine.org | Twitter

+1 vote

I have a silly question. I am working on creating a simple vertical shoot em up. I have a kinematicbody2D as a parent with an animatedSprite, animationPlayer and collisionPolygon2D as children. I want to make a collision map that also works on all the frames within the animation. Do I need to make a collision map for every seperate frame(if yes, how?) or can I just tweak my already existing collisionpolygon2d?

in Engine by (28 points)

2 Answers

0 votes
Best answer

I personally just animated the collisionPolygon at the same time as the sprite itself. I hope there is a better way of handling it though. Not sure if adding the collision as a child of the sprite would work; since when animating the sprite the collision should move with it - but I have not tested this yet.

To add more animation properties (or whatever they are called);
After you have the animation window open (at the bottom) navigate to the collisionPolygon2D and click the + button at the right of the properties you wish to animate, in order to add it to a frame. That should add them to the animation window.

by (509 points)
selected by
0 votes

Create multiple CollisionPolygons2D,
Set "Is trigger" to true for unused (meant for other frames) polygons,
Add "Is trigger" keys from those polygons to your animation to turn them on/off.

by (84 points)
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 Frequently asked questions and 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 [email protected] with your username.