Hello,
Newbie here, i (try to) use Godot 3.5.2 in 3D mode with GDscript.
I have an Area3d (which is a lamp in my game) able to detect objects entering inside of it using the signal body_entered(body: Node)
so i have this basic script :
extends Spatial
func _on_Lamp_body_entered(body):
print("[LAMP] -> coll enter", body)
It works. But what i want is to access to the position of the body inside the area... pretty much like in this pseudo code :
extends Spatial
func _on_Lamp_body_entered(body):
var position = Vector3.ZERO
#position = get body position
print("[LAMP] -> coll enter", body," at ", position)
...And i just can't wrap my head around that. So how to access the position of the body ?
Thank's!