This is against Starfleet protocol. You've been demoted. I get that you're excited to boldly go where no one has gone before, but you gotta follow the prime directive. And this isn't it. You're not in The Romulan empire. We're building a kind and safe federation here. This kind of gross misconduct isn't the vibe we want.
Posts
-
This is against Starfleet protocol. -
For some reason my camera controller continues to drift after mouse movement has stopped.For some reason my camera controller continues to drift after mouse movement has stopped.
I can't seem to figure out why this is happening or how to stop it, since I'm new to using Godot
Code for the camera controller:
#Godot #GameDev #Debuggingextends RigidBody3D var mouse_sensitivity := 0.01 var yaw_input := 0.0 var pitch_input := 0.0 # Called when the node enters the scene tree for the first time. func _ready(): # Lock mouse to game window Input.set_mouse_mode(Input.MOUSE_MODE_CAPTURED) # Called every frame. 'delta' is the elapsed time since the previous frame. func _process(delta): # Adjust camera yaw using mouse input $YawPivot.rotate_y(yaw_input) # Adjust camera pitch using mouse input $YawPivot/PitchPivot.rotate_x(pitch_input) # Lock camera pitch between 0.75 and -0.75 radians $YawPivot/PitchPivot.rotation.x = clamp( $YawPivot/PitchPivot.rotation.x, -0.75, # Negative pitch limit 0.75 # Positive pitch limit ) func _unhandled_input(event: InputEvent): # Get mouse movements when captured if event is InputEventMouseMotion: if Input.get_mouse_mode() == Input.MOUSE_MODE_CAPTURED: yaw_input = - event.relative.x * mouse_sensitivity pitch_input = - event.relative.y * mouse_sensitivity