Detecting collision between RigidBody2D and StaticBody2D in Tilemap

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By Zeikoh
:warning: Old Version Published before Godot 3 was released.

So I’m having trouble detecting a collision between a RigidBody2D and a Tilemap with a StaticBody2D. I’ve used get_colliding_bodies() but unfortunately it does not return anything when it’s colliding.

Is there something I’m missing here? I know a Kinematic body would solve this problem but really don’t want to use one since I need rotations to be applied. Is detecting such a collision even possible for a Rigid body?

:bust_in_silhouette: Reply From: Zeikoh

Never mind, I’m an idiot. What was missing was adding

set_max_contacts_reported(some_number > 0)

in func _ready()! Now get_colliding_bodies() works as expected.