Error detecting collisions under a body

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By Yamz

Index p_bounce=-1 out of size (colliders.size()=0)

ese error me aparece cuando ejecuto la escena

Escribi este codigo para detectar cuando el personaje colisona debajo de una caja para que esta reprodusca una animación

var get_coll = get_slide_collision (get_slide_count () -1)
if get_coll! = nulo:
if get_coll.normal == Vector2 (0,1) y get_coll.collider.is_in_group (“cajas”):
get_coll.collider.move ()

HOW CAN I SOLVE THAT

:bust_in_silhouette: Reply From: SynT

Instead of creating the collisions via code, try and use the nodes as childs of the object (CollisonShapes) and then use signals to start the animations when there’s objects colliding