Collision checks in a jump godot

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

I would like to know how I could make an enemy verify if a jump is safe …

for example in my 2d game it has platforms and I want the enemy to analyze the jump from one platform to another and decide if the jump is safe…

any idea?

:bust_in_silhouette: Reply From: Magso

Have a raycast from the player pointing towards where the platform needs to be and if is_colliding() is true use get_collider() to check if the raycast has returned a platform.