Collision not working properly help

I’m trying to make a flappy bird-like game and the collision for one of the parts of my characters doesn’t detect.


the wing of the cat doesn’t detect. i can just hit the wing to anything and it doesn’t detect collision.
the middle of the cats ears also doesn’t detect collision.
everywhere else does tho.

here are the conditions and actions I’m using for collision

Check the global variable god is set to false - log it to console to confirm it, with something like :
image.

Then press ctrl + shift + i when playing the game and click on the console tab to see the value of the global variable god (it’ll be 0 for false or 1 for true)


Also, you don’t need the outer If all these conditions are true. And If cat is in collision with floor is the same as If floor is in collision with cat. Something like this will suffice :

image


If that doesn’t solve it, check the collision masks for the other animations.

1 Like

thanks but i tried and god was false. also I checked all the collision masks and they all looked right. it was also only the wing that it didn’t recognise but thanks anyway.

You could turn on debugging view of bounding boxes and see where the hitbox is :


Alternatively, you could just have the playing character on screen with an obstacle. Temporarily add dragging behaviour, and drag the character around to see where collision works.

1 Like

thank i tried that and as i said the collision just doesn’t work for the whole top of the cats head

As a heads up, the platformer behavior only uses the highest point of the collision mask to the lowest point of the collision mask, plus the left most to right most sides.

A diamond shape collision mask will be ignored entirely.

You can also take a look at the “tappy plane” example in the engine, as it is a full flappy bird example.

thanks for replying. il try looking at it tommorow.