I've been stuck all day on this unfortunately.
Problem in action: https://i.gyazo.com/a13cdb3c2f318bec1559ca8011e2763b.mp4
I'm basically simulating a 10/second positional update from the server: It updates the new_pos Vector2 with x, y values 10 times a second. Game is running at 60 fps and I am trying to interpolate the character movement.
And, the lerping code:
if new_pos.x:
var lerpspeed = 0.5
set_pos(Vector2(lerp(get_pos().x, new_pos.x, lerpspeed), get_pos().y))
I'm using the Godot engine by the way (GDScript language)
I've been searching these forums and read that my lerpspeed somehow needs to be dynamic and clamped between 0.1 - 1. I'm just not entirely sure how to go about doing that. Thanks in advance