Area 2d Moving at runtime

Godot Version

godot-4

Question

I have an area 2d that is triggering in a different spot than it should when the player walks into it. It seems to me that the area is changing position at runtime. is there a way to check that this is in fact happening and if this is a real phenomenon what causes it/

The collision of an Area2D happens based on the CollisionShape2D that is the child of the Area2D.
You could print the canvas layer position of the CollisionShape2D to check, if it moves.

extends Area2D


func _process(delta):
	print($CollisionShape2D.global_position)

Have you tried turning on visible collision shape in debug to be sure the Area2d collision shape is in the right location at run time?

I think I found the issue. I’ll preface this by saying I’m a complete noob at Godot. my area was inheriting from a scene so I could instantiate it. this is probably not correct terminology. anyways, I had the instantiated node in the scene with editable children turned on. admittedly I should’ve researched this feature first, because I think that’s what was screwing me up. Now I have the areas “made local” and I’m still not sure that’s the way to go but it fixed the issue so I guess that works