Hi Guys,
i have a wired problem with move and slide. i created a video where you see it:
https://youtu.be/aG_gRidEDcA
thats my kinematik code:
extends KinematicBody2D
const ACCELERATION = 1000;
const MAX_SPEED = 300
const FRICTION = 1300
var velocity = Vector2.ZERO
func _physics_process(delta):
var input_vector = Vector2.ZERO
input_vector.x = Input.get_action_strength("ui_right") - Input.get_action_strength("ui_left")
input_vector.y = Input.get_action_strength("ui_down") - Input.get_action_strength("ui_up")
input_vector = input_vector.normalized()
if not input_vector == Vector2.ZERO:
velocity = input_vector * MAX_SPEED
else:
velocity = Vector2.ZERO
velocity = move_and_slide(velocity)
I dont know how to solve that issue