I know a cause is due to the character movement rendered as physics_process while the camera is on process… I still can’t figure out how to interpolate the physics fps into the camera’s. My monitor’s refresh rate is 165hz and physics are untouched (so they run at 60?).
Looks like there’s a solution on Reddit, and a linked ongoing github issues discusison on making this easier/part of the engine. As a 60hz monitor nerd I am surprised there isn’t a good default for this, VR toolkit just recommends increasing the physics ticks to 144
var old_position: Vector3
func _physics_process(_delta: float) -> void:
old_position = position
handle_movement_and_stuff()
func _process(_delta: float) -> void:
var t := Engine.get_physics_interpolation_fraction()
sprite.position = old_position.lerp(position, t)
Eventually I learned that nothing has interpolation when running under _physics_proccess. I tested with an immobile camera and lowering the physics ticks, and my player character does jitter at the assigned framerate.
Apparently lerp only works with floats…? In any case, the code you posted still helped me to understand more quickly how this video for interpolating the camera (and that alone is NOT enough, as stated on my first paragraph) works, and there’s a Godot 4 version code in the comments, which mentions the interpolate_with method - for Transform, which is what I’ll also need.
I did a quick test and it does interpolate, now I’ll just have to spend the time to adapt the references into my game, haha.
I came across this today dealing with the same issue. I changed my input to run in _process instead based on the info that was discussed here. I’m not sure if OP has a reason for not doing this, but if anyone is like me that runs across this issue - it’s an easy fix that I see no downside to in most projects.