I'm new at learning godot and i really need help with this :/
Whenever i walk "pressing" myself into a wall, my character really slows down. Is there anything i can do to solve this problem?
I've created my walls as a tilemap(no code, only a collision shape and the sprite)
(btw, sorry for my bad english)
my KinematicBody2D(my character sprite) code is:
.
.
extends KinematicBody2D
export var speed : int = 200
func physicsprocess(delta):
var direction = Vector2()
direction.x = Input.get_action_strength("move_right") - Input.get_action_strength("move_left")
direction.y = Input.get_action_strength("move_down") - Input.get_action_strength("move_up")
if abs(direction.x) == 1 and abs(direction.y) == 1:
direction.normalized()
var movement = speed * direction * delta
move_and_collide(movement)