Attention | Topic was automatically imported from the old Question2Answer platform. | |
Asked By | koval_dev |
This is my code:
func _on_dialog_detection_zone_body_entered(body):
label.visible = true
func _on_dialog_detection_zone_body_exited(body):
label.visible = false
I started coding on godot 3.5. Everything worked great for me there. I’m using this code to display text when a character approaches an NPC. After switching to godot 4, Area2d stopped detecting CharacterBody2D, please help me understand what is wrong with this. I tried reconnecting the body_entered and body_exited signals, but that didn’t help. I checked, the collision layers are ok. I tried adding an Area2d node to the character and using the area_entered signal, but that didn’t help either.
is monitoring set to true
on the area?
fuck | 2023-03-03 11:29
yes, I tried changing this parameter to false and then back to true. that didn’t help
koval_dev | 2023-03-03 11:33
Are there green symbols next to the functions in the script?
exuin | 2023-03-03 12:29
Yeah, there are green symbols. The signals are connected
koval_dev | 2023-03-03 13:19