Godot Version
4.4.stable
Im currently working on a first person character controller and ive come across an issue. the camera and the rest of the world look and move smoothly with physics interpolation enabled in my project settings, but any meshes attached to my camera (such as a model for a gun) seem to be stuttering. ive build a minimal reproduction of the problem and ive done some experimenting, and if i turn the physics tick rate all the way down to like 3 or 4, the issue becomes obvious. the meshes are being interpolated between physics frames, but it appears to be happening linearly and not spherically. this means that their positions in between frames dont keep their distance from the camera consistent. Ive tried using cubic_interpolate_in_time and spherical_cubic_interpolate_in_time to manually lerp the cameras transform, but the results arent great.
I really would like to keep the physics frame rate low (around 30) but even at 60 this is obvious. is there some known way around this? is there some error in my code? ive attached an image of my scene editor dock, which is the only scene in this project, the only project setting thats been changed is turning on physics interpolation, and here is the on script on the root node :
extends Node
@onready var Character : CharacterBody3D = self.get_node(^"CharacterBody3D")
@onready var Camera : Camera3D = self.get_node(^"CharacterBody3D/Camera3D")
func _ready() -> void:
Input.mouse_mode = Input.MOUSE_MODE_CAPTURED
return
func _input(event: InputEvent) -> void:
if(event is InputEventMouseMotion):
var T := Transform3D()
Camera.rotation.y -= (float(event.screen_relative.x) / float(self.get_window().size.x)) * 2.0
Camera.rotation_degrees.x = clampf(rad_to_deg(Camera.rotation.x + ((float(-event.screen_relative.y) / float(self.get_window().size.y)) * 2.0)), -85.0, 85.0)
elif(event.is_action(&"quit")) : self.get_tree().quit(0)
return
any help or solutions would be greatly appreciated!!
