Collision Body for a floor art not working

Godot Version

4.2

Question

so im making a 2d game , and in the game im working on the mechanic where you can pick a sprrite (a cat in this game) and as long as the mouse is being clicked the cat will be held and once release it will fall nd land on the floor , the problem im having is , im not using any tile maps , im just using a png of the background and the floor together , and in this my cat keeps falling through the screen , i have used is_on_floor to check for cat’s position ( on floor or not ) , my BG sprite is attached to a staticbody2d with collision shapes set for both the cat and the BG , the BG has layer - 1,2 and mask - 1 and the cat has layer - 1,2 mask -1,2

(in the image ignore the name Area2D for the image , it is actually a Staticbody2D type , only the name is different )

I don’t really know 2D but I think the cat can only land on top of the collision shape, at the base of the wall. On the picture technically it’s inside the FLOOR collision shape and will fall through.

edit: an easy workaround (that might or might not work for you) would be to check the y coordinate of the “top” of the floor, and if the cat’s global_position.y is higher than that then it should fall.

thanks , i have used that to manage its positions , now the problem im having is that none of the collision shapes are working in the project , lik, the collision shapes just do not collide , when put on to the nodes . so due to that , when i create two cats , they both get stuck together nd do not collide nd one cat goes through another cat … :slight_smile: really appreciate ur help tho , thanks