|Topic was automatically imported from the old Question2Answer platform.
I’m creating a simple match 3 type game, and I have created a grid of blocks. Each block is an Area2D node with a CollisionShape2D (rectangle) that perfectly fits the artwork. Block is 32x32 pixels and the collision node has extents of 16x16 pixels. Pixel snap is on in the settings, but this also occurs if it is off.
The blocks are placed programatically and are positioned perfectly next to each other with no separation. I’ve connected the
_input_event signal on every block to a function
_on_block_input_event which handles the input processing.
However, sometimes, if I click on the boundary between two blocks, no event happens. It’s like there is a gap between the blocks, even though there isn’t. I’ve even turned on visible collision shapes to look for gaps, but the alignment appears perfect.
Has anyone else come across this? Or maybe has some thoughts about how this might happen? Thanks
Go to you block scene and make sure the collisions shape scale is 1 on X and Y, it MUST be one, you should not scale collision shapes otherwise you gonna get weird bugs.
fpicoral | 2019-01-27 14:03
Thanks for the reply. Yeah I never touch the collision scaling for that exact reason. I’ve just double checked and all scales are set to 1.
i_love_godot | 2019-01-27 14:35