–3 votes

I was trying to make it reaching the Point and after reaching the objekt shoudnt stop but they are Always stoping at the Point.

extends KinematicBody2D

export (int) var speed = 500

var target = Vector2()
var velocity = Vector2()
var used = false


func _physics_process(delta):
    velocity = (target + position).normalized() * speed
    velocity = move_and_slide(velocity)
asked Aug 12 in Projects by Mr_Ak (9 points)

Could you please give more detail? The title doesn't include any details about your issue what-so-ever, so people wouldn't be very inclined to help you.

Your problem is that the object in question is stopping when you don't want it to? The code you have provided works for me, and I continue to move. Is there code you're not providing that may be causing the issue? Or perhaps you have a collision object in the way that you just forgot about?

Please add more details
The code works for me
And the object does not stop

Please log in or register to answer this question.

Welcome to Godot Engine Q&A, where you can ask questions and receive answers from other members of the community.

Please make sure to read How to use this Q&A? before posting your first questions.