Godot Version
4.2.1
Question
I dont know when it started happening but my area3d stopped working. I since then made a new one and checked the layers and masks with other area 3ds but there is nothing unusual going on
https://i.imgur.com/gBa5bLq.png
I also used signals as always even using body but to no avail
https://i.imgur.com/oXea8zS.png
nothing is ever printed when I have this line of code:
func _on_area_3d_body_entered(area):
print(“entered”)
this is the character’s Area3D node in the inspector
https://i.imgur.com/Xw8qKeP.png
this is the Area 3D node of a collectable in the inspector
https://i.imgur.com/bIVbfos.png
func _on_area_3d_area_entered(area):
print("entered")
if area.name == "CollectableArea3D":
print("CollectItem")
“entered” doesn’t print, and “CollectItem” doesn’t either
So anyways on another collectable (a coinlike object) I hav ea script written like this which completely works
func _on_area_3d_body_entered(body):
if body and body.has_method("get_position") and not collected: # Check if body is valid and has the expected method
target_player = body # Store the reference to the player
$Area3D/CollectSound.play()
animator.play("Collect")
collected = true
timer.start()
So maybe I just use body entered? But still nothing when I have the line vv in the player script
func _on_area_3d_body_entered(body):
print("enter")
https://i.imgur.com/IxHr2rj.png
I used to have a working Area 3D i dont know how or when it broke
Also English is my first language I just haven’t learned how to speak properly