In my scene I have two characters using KinematicBody2D for movement that are controlled via user input. The problem is that when the two characters move at each other and collide, instead of stopping they seem to jitter for a few seconds first. I've tried using moveandcollide and moveandslide but neither method seems to change this.
export var player = 1
export var walk_speed = 3.0
var velocity = Vector2.ZERO
#Set up collision layers/masks depending on player 1/2.
if player == 1:
elif player == 2:
var input_h = Input.get_action_strength("p%s_right" % player) - Input.get_action_strength("p%s_left" % player)
velocity.x = input_h * walk_speed
var collision = move_and_collide(velocity * delta)