|Topic was automatically imported from the old Question2Answer platform.
trying to add a character like the light that follows link in zelda
export var moveSpeed = 13
onready var me : Node = get_node(“/root/MainScene/Player/Stay_pos”)
var dir = (me.translation - translation).normalized()
# move the enemy towards the player
move_and_slide(dir * moveSpeed, Vector3.UP)
its a simple follow player script.it works fine but it refuses to stay on the position node above the players head for some reason unless the node is colliding with the floor. i tried various other nodes like a spatial, even attaching kinematicbody to its fellow kinematicbody to see if it would work but it started glitching.
so far this has been troubling as it is one of the core mechanics in my project. would appreciate it if someone told me what i’m doing wrong