I have a
KinematicBody2D player node for which I check
is_on_ceiling() in each iteration of the physics loop and execute the appropriate code, which works well when colliding with genuine floors/walls/ceilings.
The problem is that the enemies (also
KinematicBody2D nodes) cause these functions to return true when the player collides with them. I only wish for the code I've written to execute when the player collides with genuine floors/walls/ceilings (which I've identified by adding them to a dedicated collision layer).
Is there any way to easily get the collider which caused the engine to return true when
is_on_floor was called (if there are multiple, just the first would be fine)? If not, is my only option to put raycasts and do a manual check, effectively eschewing the