system
1
|
|
|
|
Attention |
Topic was automatically imported from the old Question2Answer platform. |
|
Asked By |
Johnnyfantastic6 |
func _on_Hurtbox_area_entered(_area):
variable = true
func _on_Hurtbox_area_exited(_area):
variable = false
it’s ugly and I want to make it look better
system
2
|
|
|
|
Reply From: |
dustin |
firstly, are you gonna make use of the overlapping bodies properties? if you are, thats not a good solution.
second, if you just want to check if there is nothing overlapping your area, just do this:
func _process():
variable = ($area2d.get_overlapping_bodies() == []) #empty or not (true/false)