The method "move_and_collide" isn´t declared in the current class

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By Paul Wetzel
Hello, I am recieving the above errorwhen trying to use the move and collide method. Does anybody know what I need to do? Sorry, complete beginner in Godot...

func _physics_process(delta):
move_and_collide(direction * delta)

Unless the script extends KinematicBody/KinematicBody2D (or uses those classes in some way), the function move_and_collide() can’t be used.

Ertain | 2022-09-21 12:24

:bust_in_silhouette: Reply From: jisuwudou

you may check what parent class your script extends