I am scaling a node containing a KinematicBody2D, a Sprite, and a CollisionShape2D (rectangle) and trying to detect when this collides with another KinematicBody2D or StaticBody2D.
I have another KinematicBody2D ball bouncing around the scene, and it can interact with these nodes while they are scaling. It bounces correctly off of them both while the tween is going on, and when it stops. My problem is that I want to stop the tween when these nodes come in contact with each other, and I'm struggling to detect that collision.
I drop several of these nodes on top of each other, or have them intersecting and print(is_colliding()) is always false.
In this screenshot, the vertical and horizontal lines are these nodes. The ball is successfully trapped, and bouncing around in that little box in the lower portion of the screen.
If I press the button, a new node will be placed at the top of the screen, just above the arrow and start scaling downward. I'd like to detect, and stop this scaling it when it hits the top horizontal line, but I'm having difficulty detecting that collision.
All of these nodes are layer 1 with a mask of 1, while the ball is on layer 2 with a mask of 1 and 2