Lethn I took your code and simplified it to just the mouse look component and I could not get it to print anything out of the range of -.75 to .75 regardless of how fast i moved my mouse:
extends CharacterBody3D
var mouseSensitivity = 0.2
var direction = Vector3()
var gravityVector = Vector3()
var horizontalVelocity = Vector3()
var movement = Vector3()
var customVelocity = Vector3()
var fall = Vector3()
var speed
var defaultMoveSpeed = 5.0
var sprintMoveSpeed = 10.0
var crouchMoveSpeed = 1.0
var gravity = 10
var jumpHeight = 6
var horizontalAcceleration = 6
var swayAmount = 30
var verticalSwayAmount = 30
var plasmaPistolMaxGunShake = 1.5
var crouchingPlasmaPistolMaxGunShake = 0.5
@onready var mouseLookNode = $MouseLookNode
@onready var playerCollisionShape = $PlayerCollisionShape
@onready var playerCamera = $MouseLookNode/PlayerCamera
var isHittingCeiling = false
var isCrouching = false
var isSprinting = false
var isPlayerFiring = false
var isFlashlightEnabled = false
var canEnterDriverSeat = false
var vehicleDriverArea
func _ready():
Input.set_mouse_mode(Input.MOUSE_MODE_CAPTURED)
playerCamera.make_current()
isCrouching = false
playerCollisionShape.set_deferred(("disabled"), false)
speed = defaultMoveSpeed
func _unhandled_input(event):
if event is InputEventMouseMotion:
rotate_y(deg_to_rad(-event.relative.x * mouseSensitivity))
mouseLookNode.rotate_x(deg_to_rad(mouseSensitivity * event.relative.y))
mouseLookNode.rotation.x = clamp (mouseLookNode.rotation.x, -(PI/4), PI/4)
prints(mouseLookNode.rotation.x);
# mouseLookNode.rotation.x = clamp(mouseLookNode.rotation.x, deg_to_rad(-80), deg_to_rad(80))
```