diff --git a/main.tscn b/main.tscn index c74d95b..2545609 100644 --- a/main.tscn +++ b/main.tscn @@ -6,7 +6,7 @@ [ext_resource type="Texture2D" uid="uid://wdjmyv260he1" path="res://world/textures/grass.jpg" id="2_272bh"] [ext_resource type="PackedScene" uid="uid://of6tq8gpjxtu" path="res://gears/gear_pickup.tscn" id="3_lquwl"] [ext_resource type="PackedScene" uid="uid://bafl8q0r61xrg" path="res://gears/gear.tscn" id="4_7mycd"] -[ext_resource type="Texture2D" uid="uid://bkq72dydktldv" path="res://world/sky/sky.hdr" id="8_5vw27"] +[ext_resource type="Texture2D" uid="uid://bkq72dydktldv" path="res://world/textures/sky.hdr" id="8_5vw27"] [sub_resource type="BoxShape3D" id="BoxShape3D_7dm0k"] size = Vector3(1000, 2, 1000) diff --git a/player/camera_gimbal.gd b/player/camera_gimbal.gd index d870429..28ec946 100644 --- a/player/camera_gimbal.gd +++ b/player/camera_gimbal.gd @@ -26,9 +26,9 @@ func _input(event): if event is InputEventMouseMotion: mouse_x_velocity = event.relative.x mouse_y_velocity = event.relative.y - elif event.is_action_pressed("zoom_in"): - current_zoom += 5 elif event.is_action_pressed("zoom_out"): + current_zoom += 5 + elif event.is_action_pressed("zoom_in"): current_zoom -= 5 func _process(delta): @@ -40,18 +40,17 @@ func _process(delta): if shift_lock == true: shift_lock = false else: - shift_lock = true - + shift_lock = true elif Input.is_mouse_button_pressed(MOUSE_BUTTON_RIGHT) or shift_lock == true: if mouse_locked == false: mouse_locked = true locked_mouse_positon = get_viewport().get_mouse_position() Input.set_mouse_mode(Input.MOUSE_MODE_CAPTURED) - if mouse_x_velocity > 5 or mouse_x_velocity < -5: - y -= clamp(mouse_x_velocity / 12.5,-10,10) - if mouse_y_velocity > 5 or mouse_y_velocity < -5: - x -= clamp(mouse_y_velocity / 12.5,-10,10) - + + if mouse_x_velocity > 5 or mouse_x_velocity < -5: + y -= clamp(mouse_x_velocity / 12.5, -10, 10) + if mouse_y_velocity > 5 or mouse_y_velocity < -5: + x -= clamp(mouse_y_velocity / 12.5, -10, 10) else: Input.set_mouse_mode(Input.MOUSE_MODE_VISIBLE) mouse_locked = false diff --git a/world/sky/sky.hdr b/world/textures/sky.hdr similarity index 100% rename from world/sky/sky.hdr rename to world/textures/sky.hdr