I have a player and an enemy. My player also has a child node called "ObjectContainer" which is basically a small collision box that moves from beneath the player to the top of the player (think of Mario picking up an item in Super Mario 2/Super Mario USA).
What I'm trying to figure out is what line of code would make my enemy node follow or "chase" the "ObjectContainer" node and stay hovering over that position unless specified otherwise.
Basically, make a node gradually and consistently move towards another node, wherever it's position may be.
I was thinking of trying add_child(), but I assume that would make the enemy node just suddenly pop into the position of the node it's now a child of. I also tried "body.velocity = body.position.direction_to($EnemyContainer.position) * body.speed", but the enemy just starts slowly rising vertically into the air forever for some reason.
Any ideas?