Error in method "MOVE" in KinematicBody2d

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By guhenrik

func _process(delta):
move(direcao * velocidade * delta)

time =- delta

if time <= 0:
	print("DESTRUIDO")
	queue_free()

Method ‘move’ is not declared in the current class

:bust_in_silhouette: Reply From: kidscancode

KinematicBody2D does not have a move() method. It has move_and_collide() and move_and_slide(), which are for moving the body and returning/responding to collisions.

For more information and examples, see:

Also, you should always refer to a node’s API documentation for what methods and properties is provides:
https://docs.godotengine.org/en/latest/classes/class_kinematicbody2d.html