Checking if an area is currently being touched by the player

Godot Version

Godot 4.3

Question

Hi, in my game I want an area to check if the player is currently touching it, not when it enters the area. I saw that some people used this function online but it doesnt seem to work, any ideas?

@onready var loc_col = $reset_area

if loc_col.is_colliding():
Global.is_player_right = true
else:
Global.is_player_right = false

You can call “get_overlapping_bodies()” and see if one of them is the player

this worked, thank you!

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.