KInematicBody2D isnt moving

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

Hello! I have an a problem with kinematicbody2d, it isnt moving, i set him a moving buttons, when i trying to move my body,it wont move! So i tried to change type to RigidBody2D, when i tried to launch game, my monkey(RigidBody2D) became huge MONKEY.
photo of RigidBody: problemo hosted at ImgBB — ImgBB

Can you add a comment with the code you are using to try to get it to move?

Gluon | 2022-01-08 19:30

:bust_in_silhouette: Reply From: Mr. Gamezz

So I believe what’s wrong is that the KinematicBody2D was either inside of another collision object OR you didn’t hook up the movement script the right way. If it is inside of a collider, Just move it out. This is how I would go about moving the character.

func _process(delta):
if Input.is_action_pressed("Move_Right"):
self.position.x += 5
elif Input.is_action_pressed("Move_Left"):
self.position.x -= 5

This is a very simplistic version of movement to left and right. I hope this helps :slight_smile: