How to prevent collision when the object is a certain point below or above the y axis

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

Basically this image explains perfectly what I mean.

Image of collision problem

I want to prevent collision when the energy beam is above or below the character. Any idea how to do this? Are there any solution besides making the collision shape really small?

:bust_in_silhouette: Reply From: Skydome

Use area.get_parent().get_parent() to get the parent kinematic body of the collided object and then compare it’s y co-ordinate.