player: removed empty lines
This commit is contained in:
parent
44c3cfa0d9
commit
3a635e9551
1 changed files with 0 additions and 4 deletions
|
|
@ -1,8 +1,6 @@
|
||||||
class_name CameraGimbal extends Node3D
|
class_name CameraGimbal extends Node3D
|
||||||
|
|
||||||
@export var rotation_speed = (PI / 180) * 120
|
@export var rotation_speed = (PI / 180) * 120
|
||||||
@onready var Camera = $InnerGimbal/Camera3D
|
|
||||||
|
|
||||||
|
|
||||||
func reset():
|
func reset():
|
||||||
basis = Basis()
|
basis = Basis()
|
||||||
|
|
@ -11,13 +9,11 @@ func reset():
|
||||||
func rotate_camera_y(y, delta):
|
func rotate_camera_y(y, delta):
|
||||||
rotate_object_local(Vector3.UP, y * rotation_speed * delta)
|
rotate_object_local(Vector3.UP, y * rotation_speed * delta)
|
||||||
func rotate_camera_x(x, delta):
|
func rotate_camera_x(x, delta):
|
||||||
|
|
||||||
$InnerGimbal.rotate_object_local(
|
$InnerGimbal.rotate_object_local(
|
||||||
Vector3.RIGHT, x * rotation_speed * delta)
|
Vector3.RIGHT, x * rotation_speed * delta)
|
||||||
$InnerGimbal.rotation.x = clamp($InnerGimbal.rotation.x,-0.8,0.7)
|
$InnerGimbal.rotation.x = clamp($InnerGimbal.rotation.x,-0.8,0.7)
|
||||||
|
|
||||||
func _process(delta):
|
func _process(delta):
|
||||||
|
|
||||||
# rotate outer gimbal around y axis
|
# rotate outer gimbal around y axis
|
||||||
var y = 0
|
var y = 0
|
||||||
if Input.is_action_pressed("cam_left"):
|
if Input.is_action_pressed("cam_left"):
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue