0 votes

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: https://ibb.co/sWKrfBy

Godot version 3.3.5 DragonBones
in Engine by (12 points)

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

1 Answer

0 votes

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 :)

by (57 points)
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 Frequently asked questions and How to use this Q&A? before posting your first questions.
Social login is currently unavailable. If you've previously logged in with a Facebook or GitHub account, use the I forgot my password link in the login box to set a password for your account. If you still can't access your account, send an email to [email protected] with your username.