In Godot 3.0, the fixed_process() function was renamed to _physics_process(). You also don’t need to enable it in _ready() as it’s auto enabled. Finally, you’ll want to multiply your velocity by delta or your speed will be 100 pixels per frame, which is going to be much too fast:
extends KinematicBody2D
var speed = 100
onready var obj = get_parent().get_node("jugador")
func _physics_process(delta):
var dir = (obj.global_position - global_position).normalized()
move_and_collide(dir * speed * delta)
thanks man, that problem had me stranded
aleoli669 | 2019-02-11 17:27
So if you wanted the enemy to play an animation when moving where do you put the code
Ogeeice | 2019-07-14 16:58
Thank you so much! I’ve been trying to watch tutorials and read articles but I just couldn’t find it, till this post!