Compare commits
1 Commits
main
...
forces-rew
| Author | SHA1 | Date | |
|---|---|---|---|
| 56dde7e9ed |
Binary file not shown.
|
Before Width: | Height: | Size: 1.0 MiB |
@@ -1,34 +0,0 @@
|
|||||||
[remap]
|
|
||||||
|
|
||||||
importer="texture"
|
|
||||||
type="CompressedTexture2D"
|
|
||||||
uid="uid://dgd28xjuois8o"
|
|
||||||
path="res://.godot/imported/icon.png-b86bcebb890b0198cb8e55cd5cfea3b7.ctex"
|
|
||||||
metadata={
|
|
||||||
"vram_texture": false
|
|
||||||
}
|
|
||||||
|
|
||||||
[deps]
|
|
||||||
|
|
||||||
source_file="res://assets/textures/icon.png"
|
|
||||||
dest_files=["res://.godot/imported/icon.png-b86bcebb890b0198cb8e55cd5cfea3b7.ctex"]
|
|
||||||
|
|
||||||
[params]
|
|
||||||
|
|
||||||
compress/mode=0
|
|
||||||
compress/high_quality=false
|
|
||||||
compress/lossy_quality=0.7
|
|
||||||
compress/hdr_compression=1
|
|
||||||
compress/normal_map=0
|
|
||||||
compress/channel_pack=0
|
|
||||||
mipmaps/generate=false
|
|
||||||
mipmaps/limit=-1
|
|
||||||
roughness/mode=0
|
|
||||||
roughness/src_normal=""
|
|
||||||
process/fix_alpha_border=true
|
|
||||||
process/premult_alpha=false
|
|
||||||
process/normal_map_invert_y=false
|
|
||||||
process/hdr_as_srgb=false
|
|
||||||
process/hdr_clamp_exposure=false
|
|
||||||
process/size_limit=0
|
|
||||||
detect_3d/compress_to=1
|
|
||||||
@@ -1,5 +1,3 @@
|
|||||||
class_name Drone
|
|
||||||
|
|
||||||
extends RigidBody3D
|
extends RigidBody3D
|
||||||
|
|
||||||
# Local coords to axis
|
# Local coords to axis
|
||||||
@@ -9,20 +7,24 @@ extends RigidBody3D
|
|||||||
|
|
||||||
@export_category("Parameters")
|
@export_category("Parameters")
|
||||||
@export var flight_modes: Array = ["normal", "acro"]
|
@export var flight_modes: Array = ["normal", "acro"]
|
||||||
@export var throttle_curve: Curve
|
|
||||||
@export var armed: bool = false
|
@export var armed: bool = false
|
||||||
@export var can_flip: bool = false
|
@export var can_flip: bool = false
|
||||||
@export var throttle_speed: float = 0.0
|
@export var throttle_speed: float = 0.0
|
||||||
@export var rotation_speed: float = 0.06
|
@export var rotation_speed: float = 0.15
|
||||||
@export var max_speed: float = 20.0
|
@export var max_speed: float = 20.0
|
||||||
@export var max_rotation_speed: float = 15.0
|
@export var max_rotation_speed: float = 15.0
|
||||||
@export var thrust_factor: float = 1.0
|
@export var thrust_factor: float = 2.0
|
||||||
@export_category("Node References")
|
@export_category("Node References")
|
||||||
@export var camera: Camera3D
|
@export var camera: Camera3D
|
||||||
@export var anim_player: AnimationPlayer
|
@export var anim_player: AnimationPlayer
|
||||||
@export var flip_over_detection_ray: RayCast3D
|
@export var flip_over_detection_ray: RayCast3D
|
||||||
@export var flip_over_timer: Timer
|
@export var flip_over_timer: Timer
|
||||||
@export var input_suggestion_label: Label
|
@export var input_suggestion_label: Label
|
||||||
|
@export var reset_point: Marker3D
|
||||||
|
@export var thrust_point_fr: Marker3D
|
||||||
|
@export var thrust_point_fl: Marker3D
|
||||||
|
@export var thrust_point_rl: Marker3D
|
||||||
|
@export var thrust_point_rr: Marker3D
|
||||||
|
|
||||||
var animation_initalized: bool = false
|
var animation_initalized: bool = false
|
||||||
var using_joy_controller: bool = true
|
var using_joy_controller: bool = true
|
||||||
@@ -85,9 +87,9 @@ func _physics_process(_delta): # Still needed for other physics
|
|||||||
_handle_drone_flipping()
|
_handle_drone_flipping()
|
||||||
|
|
||||||
|
|
||||||
func _input(_event):
|
func _input(event):
|
||||||
if Input.is_action_just_pressed("reset_drone"):
|
if Input.is_action_just_pressed("reset_drone"):
|
||||||
global_position = GameManager.reset_point.global_position
|
global_position = reset_point.global_position
|
||||||
global_rotation = Vector3.ZERO
|
global_rotation = Vector3.ZERO
|
||||||
linear_velocity = Vector3.ZERO
|
linear_velocity = Vector3.ZERO
|
||||||
angular_velocity = Vector3.ZERO
|
angular_velocity = Vector3.ZERO
|
||||||
@@ -95,48 +97,25 @@ func _input(_event):
|
|||||||
|
|
||||||
func _integrate_forces(state):
|
func _integrate_forces(state):
|
||||||
if armed and GameManager.game_started:
|
if armed and GameManager.game_started:
|
||||||
|
var yaw_input = Input.get_axis("yaw_right", "yaw_left")
|
||||||
|
var roll_input = Input.get_axis("roll_right", "roll_left")
|
||||||
|
var pitch_input = Input.get_axis("pitch_backward", "pitch_forward")
|
||||||
|
var throttle_input = Input.get_axis("throttle_down", "throttle_up")
|
||||||
|
|
||||||
|
if using_joy_controller:
|
||||||
if GameManager.controller_mode == "JoyController":
|
|
||||||
var yaw_input = Input.get_axis("joy_yaw_right", "joy_yaw_left")
|
|
||||||
var roll_input = Input.get_axis("joy_roll_right", "joy_roll_left")
|
|
||||||
var pitch_input = Input.get_axis("joy_pitch_backward", "joy_pitch_forward")
|
|
||||||
var throttle_input = Input.get_axis("joy_throttle_down", "joy_throttle_up")
|
|
||||||
if throttle_input > 0:
|
if throttle_input > 0:
|
||||||
throttle_speed = throttle_input * 100
|
throttle_speed = throttle_input * 100
|
||||||
apply_central_force(global_transform.basis.y * throttle_curve.sample((throttle_speed-1)/99) * thrust_factor)
|
state.apply_force(global_transform.basis.y * throttle_input * thrust_factor, thrust_point_fr.global_position)
|
||||||
|
state.apply_force(global_transform.basis.y * throttle_input * thrust_factor, thrust_point_fl.global_position)
|
||||||
|
state.apply_force(global_transform.basis.y * throttle_input * thrust_factor, thrust_point_rr.global_position)
|
||||||
|
state.apply_force(global_transform.basis.y * throttle_input * thrust_factor, thrust_point_rl.global_position)
|
||||||
|
|
||||||
linear_velocity.x = clampf(linear_velocity.x, -max_speed, max_speed)
|
#linear_velocity.x = clampf(linear_velocity.x, -max_speed, max_speed)
|
||||||
linear_velocity.y = clampf(linear_velocity.y, -max_speed*2.0, max_speed)
|
#linear_velocity.y = clampf(linear_velocity.y, -100.0, max_speed)
|
||||||
linear_velocity.z = clampf(linear_velocity.z, -max_speed, max_speed)
|
#linear_velocity.z = clampf(linear_velocity.z, -max_speed, max_speed)
|
||||||
|
|
||||||
apply_central_force(global_transform.basis.y * 1 * thrust_factor) # Base thrust while props are idley spinning
|
|
||||||
|
|
||||||
# Speed scale adjusted for animation
|
# Speed scale adjusted for animation
|
||||||
anim_player.speed_scale = throttle_input * 4
|
anim_player.speed_scale = throttle_input * 4
|
||||||
anim_player.speed_scale = clampf(anim_player.speed_scale, 1.0, 4.0)
|
anim_player.speed_scale = clampf(anim_player.speed_scale, 1.0, 4.0)
|
||||||
|
|
||||||
if yaw_input != 0:
|
# Rotation
|
||||||
rotate_object_local(Vector3.UP, yaw_input * rotation_speed) # Y axis rotation
|
|
||||||
if roll_input != 0:
|
|
||||||
rotate_object_local(Vector3.FORWARD, roll_input * rotation_speed) # Z axis rotation
|
|
||||||
if pitch_input != 0:
|
|
||||||
rotate_object_local(Vector3.RIGHT, pitch_input * rotation_speed) # X axis rotation
|
|
||||||
|
|
||||||
# Damping
|
|
||||||
if yaw_input == 0:
|
|
||||||
state.angular_velocity.y = lerp(state.angular_velocity.y, 0.0, 0.1)
|
|
||||||
if roll_input == 0:
|
|
||||||
state.angular_velocity.z = lerp(state.angular_velocity.z, 0.0, 0.1)
|
|
||||||
if pitch_input == 0:
|
|
||||||
state.angular_velocity.x = lerp(state.angular_velocity.x, 0.0, 0.1)
|
|
||||||
|
|
||||||
if GameManager.controller_mode == "FPVRemote":
|
|
||||||
var yaw_input = Input.get_axis("fpv_yaw_right", "fpv_yaw_left")
|
|
||||||
var roll_input = Input.get_axis("fpv_roll_right", "fpv_roll_left")
|
|
||||||
var pitch_input = Input.get_axis("fpv_pitch_backward", "fpv_pitch_forward")
|
|
||||||
var throttle_input = Input.get_axis("fpv_throttle_down", "fpv_throttle_up")
|
|
||||||
|
|
||||||
if throttle_input > -1:
|
|
||||||
var scaled_throttle_input = (throttle_input + 1)/2 # scales throttle from (-1 to 1) to (0 to 1)
|
|
||||||
print(scaled_throttle_input)
|
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
[gd_scene load_steps=107 format=4 uid="uid://dwvmna8qc0vb4"]
|
[gd_scene load_steps=104 format=4 uid="uid://dwvmna8qc0vb4"]
|
||||||
|
|
||||||
[ext_resource type="Script" path="res://core/drone/drone.gd" id="1_de83i"]
|
[ext_resource type="Script" path="res://core/drone/drone.gd" id="1_de83i"]
|
||||||
[ext_resource type="Material" uid="uid://d0gkxc5fuh354" path="res://core/resources/materials/black_carbon_fiber.tres" id="2_phv8m"]
|
[ext_resource type="Material" uid="uid://d0gkxc5fuh354" path="res://core/resources/materials/black_carbon_fiber.tres" id="2_phv8m"]
|
||||||
@@ -10,19 +10,12 @@
|
|||||||
[ext_resource type="Material" uid="uid://uy2txkh3slat" path="res://core/resources/materials/pink_motor.tres" id="6_3gtkc"]
|
[ext_resource type="Material" uid="uid://uy2txkh3slat" path="res://core/resources/materials/pink_motor.tres" id="6_3gtkc"]
|
||||||
[ext_resource type="Script" path="res://core/scripts/camera_3d.gd" id="9_8eblv"]
|
[ext_resource type="Script" path="res://core/scripts/camera_3d.gd" id="9_8eblv"]
|
||||||
[ext_resource type="Shader" path="res://core/resources/shaders/vhs.gdshader" id="9_66bpw"]
|
[ext_resource type="Shader" path="res://core/resources/shaders/vhs.gdshader" id="9_66bpw"]
|
||||||
[ext_resource type="Shader" path="res://core/resources/shaders/fisheye.gdshader" id="10_5gurm"]
|
|
||||||
[ext_resource type="Texture2D" uid="uid://bv7klk2tmhya2" path="res://assets/textures/rgba-noise-medium.png" id="10_ylv8e"]
|
[ext_resource type="Texture2D" uid="uid://bv7klk2tmhya2" path="res://assets/textures/rgba-noise-medium.png" id="10_ylv8e"]
|
||||||
[ext_resource type="PackedScene" uid="uid://c6w6axh4l4w8d" path="res://core/tools/fps_label.tscn" id="12_u7iaa"]
|
[ext_resource type="PackedScene" uid="uid://c6w6axh4l4w8d" path="res://core/tools/fps_label.tscn" id="12_u7iaa"]
|
||||||
|
|
||||||
[sub_resource type="PhysicsMaterial" id="PhysicsMaterial_kpx62"]
|
[sub_resource type="PhysicsMaterial" id="PhysicsMaterial_kpx62"]
|
||||||
bounce = 0.1
|
bounce = 0.1
|
||||||
|
|
||||||
[sub_resource type="Curve" id="Curve_x75as"]
|
|
||||||
max_value = 100.0
|
|
||||||
bake_resolution = 1
|
|
||||||
_data = [Vector2(0, 0), 0.0, 0.0, 0, 0, Vector2(1, 100), 235.0, 0.0, 0, 0]
|
|
||||||
point_count = 2
|
|
||||||
|
|
||||||
[sub_resource type="Animation" id="Animation_a4tqt"]
|
[sub_resource type="Animation" id="Animation_a4tqt"]
|
||||||
length = 0.001
|
length = 0.001
|
||||||
tracks/0/type = "value"
|
tracks/0/type = "value"
|
||||||
@@ -1075,10 +1068,6 @@ _surfaces = [{
|
|||||||
blend_shape_mode = 0
|
blend_shape_mode = 0
|
||||||
shadow_mesh = SubResource("ArrayMesh_oy56j")
|
shadow_mesh = SubResource("ArrayMesh_oy56j")
|
||||||
|
|
||||||
[sub_resource type="ShaderMaterial" id="ShaderMaterial_0hj7y"]
|
|
||||||
shader = ExtResource("10_5gurm")
|
|
||||||
shader_parameter/fisheye_strength = 1.0
|
|
||||||
|
|
||||||
[sub_resource type="ShaderMaterial" id="ShaderMaterial_pkxv0"]
|
[sub_resource type="ShaderMaterial" id="ShaderMaterial_pkxv0"]
|
||||||
shader = ExtResource("9_66bpw")
|
shader = ExtResource("9_66bpw")
|
||||||
shader_parameter/curvature = 0.0
|
shader_parameter/curvature = 0.0
|
||||||
@@ -1095,20 +1084,23 @@ shader_parameter/scanline_thickness = 0.5
|
|||||||
shader_parameter/scanlines_spacing = 1.0
|
shader_parameter/scanlines_spacing = 1.0
|
||||||
shader_parameter/noise_texture = ExtResource("10_ylv8e")
|
shader_parameter/noise_texture = ExtResource("10_ylv8e")
|
||||||
|
|
||||||
[node name="Drone" type="RigidBody3D" node_paths=PackedStringArray("camera", "anim_player", "flip_over_detection_ray", "flip_over_timer", "input_suggestion_label")]
|
[node name="Drone" type="RigidBody3D" node_paths=PackedStringArray("camera", "anim_player", "flip_over_detection_ray", "flip_over_timer", "input_suggestion_label", "thrust_point_fr", "thrust_point_fl", "thrust_point_rl", "thrust_point_rr")]
|
||||||
collision_layer = 2
|
collision_layer = 2
|
||||||
collision_mask = 7
|
collision_mask = 7
|
||||||
|
mass = 0.6
|
||||||
physics_material_override = SubResource("PhysicsMaterial_kpx62")
|
physics_material_override = SubResource("PhysicsMaterial_kpx62")
|
||||||
can_sleep = false
|
can_sleep = false
|
||||||
continuous_cd = true
|
continuous_cd = true
|
||||||
script = ExtResource("1_de83i")
|
script = ExtResource("1_de83i")
|
||||||
throttle_curve = SubResource("Curve_x75as")
|
|
||||||
thrust_factor = 2.0
|
|
||||||
camera = NodePath("VisualComponets/CameraPivot/Camera3D")
|
camera = NodePath("VisualComponets/CameraPivot/Camera3D")
|
||||||
anim_player = NodePath("AnimationPlayer")
|
anim_player = NodePath("AnimationPlayer")
|
||||||
flip_over_detection_ray = NodePath("FlipOverDetectionRay")
|
flip_over_detection_ray = NodePath("FlipOverDetectionRay")
|
||||||
flip_over_timer = NodePath("FlipOverTimer")
|
flip_over_timer = NodePath("FlipOverTimer")
|
||||||
input_suggestion_label = NodePath("VisualComponets/CameraPivot/Camera3D/CanvasLayer/HUD/VBoxContainer/HBoxContainer/MarginContainer/InputSuggestionLabel")
|
input_suggestion_label = NodePath("VisualComponets/CameraPivot/Camera3D/CanvasLayer/HUD/VBoxContainer/HBoxContainer/MarginContainer/InputSuggestionLabel")
|
||||||
|
thrust_point_fr = NodePath("VisualComponets/Propellers/ThrustPointFR")
|
||||||
|
thrust_point_fl = NodePath("VisualComponets/Propellers/ThrustPointFL")
|
||||||
|
thrust_point_rl = NodePath("VisualComponets/Propellers/ThrustPointRL")
|
||||||
|
thrust_point_rr = NodePath("VisualComponets/Propellers/ThrustPointRR")
|
||||||
|
|
||||||
[node name="AnimationPlayer" type="AnimationPlayer" parent="."]
|
[node name="AnimationPlayer" type="AnimationPlayer" parent="."]
|
||||||
libraries = {
|
libraries = {
|
||||||
@@ -1246,6 +1238,7 @@ surface_material_override/0 = ExtResource("2_phv8m")
|
|||||||
|
|
||||||
[node name="battery" type="MeshInstance3D" parent="VisualComponets"]
|
[node name="battery" type="MeshInstance3D" parent="VisualComponets"]
|
||||||
transform = Transform3D(4, 0, 0, 0, 4, 0, 0, 0, 8, 0, 13.1, 0)
|
transform = Transform3D(4, 0, 0, 0, 4, 0, 0, 0, 8, 0, 13.1, 0)
|
||||||
|
visible = false
|
||||||
mesh = SubResource("ArrayMesh_v7fro")
|
mesh = SubResource("ArrayMesh_v7fro")
|
||||||
skeleton = NodePath("")
|
skeleton = NodePath("")
|
||||||
surface_material_override/0 = ExtResource("4_0xsmy")
|
surface_material_override/0 = ExtResource("4_0xsmy")
|
||||||
@@ -1316,8 +1309,20 @@ mesh = SubResource("ArrayMesh_71i3b")
|
|||||||
skeleton = NodePath("")
|
skeleton = NodePath("")
|
||||||
surface_material_override/0 = ExtResource("4_ltc6o")
|
surface_material_override/0 = ExtResource("4_ltc6o")
|
||||||
|
|
||||||
|
[node name="ThrustPointFR" type="Marker3D" parent="VisualComponets/Propellers"]
|
||||||
|
transform = Transform3D(0.163188, 0, 0, 0, 0.163188, 0, 0, 0, 0.163188, -21.6181, 7.31745, 18.168)
|
||||||
|
|
||||||
|
[node name="ThrustPointFL" type="Marker3D" parent="VisualComponets/Propellers"]
|
||||||
|
transform = Transform3D(-0.163188, 0, 0, 0, 0.163188, 4.13711e-07, 0, -4.13711e-07, 0.163188, 21.6121, 7.31745, 18.1964)
|
||||||
|
|
||||||
|
[node name="ThrustPointRL" type="Marker3D" parent="VisualComponets/Propellers"]
|
||||||
|
transform = Transform3D(0.163188, 0, 0, 0, 0.163188, 0, 0, 0, 0.163188, 21.655, 7.31745, -18.1665)
|
||||||
|
|
||||||
|
[node name="ThrustPointRR" type="Marker3D" parent="VisualComponets/Propellers"]
|
||||||
|
transform = Transform3D(-0.163188, 0, 0, 0, 0.163188, 4.13711e-07, 0, -4.13711e-07, 0.163188, -21.6181, 7.36257, -18.1559)
|
||||||
|
|
||||||
[node name="CameraPivot" type="Node3D" parent="VisualComponets"]
|
[node name="CameraPivot" type="Node3D" parent="VisualComponets"]
|
||||||
transform = Transform3D(1, 0, 0, 0, 0.866026, 0.5, 0, -0.5, 0.866026, 0, 4.87816, 15.4717)
|
transform = Transform3D(1, 0, 0, 0, 0.965926, 0.258819, 0, -0.258819, 0.965926, 0, 4.87816, 15.4717)
|
||||||
|
|
||||||
[node name="camera" type="MeshInstance3D" parent="VisualComponets/CameraPivot"]
|
[node name="camera" type="MeshInstance3D" parent="VisualComponets/CameraPivot"]
|
||||||
transform = Transform3D(2.12178, 0, 0, 0, 2.12178, 0, 0, 0, 1.06089, 0, 0, 0)
|
transform = Transform3D(2.12178, 0, 0, 0, 2.12178, 0, 0, 0, 1.06089, 0, 0, 0)
|
||||||
@@ -1332,23 +1337,6 @@ script = ExtResource("9_8eblv")
|
|||||||
|
|
||||||
[node name="CanvasLayer" type="CanvasLayer" parent="VisualComponets/CameraPivot/Camera3D"]
|
[node name="CanvasLayer" type="CanvasLayer" parent="VisualComponets/CameraPivot/Camera3D"]
|
||||||
|
|
||||||
[node name="FisheyeVFX" type="Control" parent="VisualComponets/CameraPivot/Camera3D/CanvasLayer"]
|
|
||||||
layout_mode = 3
|
|
||||||
anchors_preset = 15
|
|
||||||
anchor_right = 1.0
|
|
||||||
anchor_bottom = 1.0
|
|
||||||
grow_horizontal = 2
|
|
||||||
grow_vertical = 2
|
|
||||||
|
|
||||||
[node name="ColorRect" type="ColorRect" parent="VisualComponets/CameraPivot/Camera3D/CanvasLayer/FisheyeVFX"]
|
|
||||||
material = SubResource("ShaderMaterial_0hj7y")
|
|
||||||
layout_mode = 1
|
|
||||||
anchors_preset = 15
|
|
||||||
anchor_right = 1.0
|
|
||||||
anchor_bottom = 1.0
|
|
||||||
grow_horizontal = 2
|
|
||||||
grow_vertical = 2
|
|
||||||
|
|
||||||
[node name="VHSVFX" type="Control" parent="VisualComponets/CameraPivot/Camera3D/CanvasLayer"]
|
[node name="VHSVFX" type="Control" parent="VisualComponets/CameraPivot/Camera3D/CanvasLayer"]
|
||||||
visible = false
|
visible = false
|
||||||
layout_mode = 3
|
layout_mode = 3
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because one or more lines are too long
@@ -1,27 +1,27 @@
|
|||||||
[gd_scene load_steps=5 format=3 uid="uid://5ht1wfq36328"]
|
[gd_scene load_steps=6 format=3 uid="uid://5ht1wfq36328"]
|
||||||
|
|
||||||
|
[ext_resource type="Shader" uid="uid://c66rr4lq10okt" path="res://core/resources/shaders/ground_repetition.tres" id="1_ggga8"]
|
||||||
[ext_resource type="PackedScene" uid="uid://bsbckpn0bymwl" path="res://assets/models/level_building/scene.gltf" id="2_orjp2"]
|
[ext_resource type="PackedScene" uid="uid://bsbckpn0bymwl" path="res://assets/models/level_building/scene.gltf" id="2_orjp2"]
|
||||||
|
|
||||||
[sub_resource type="WorldBoundaryShape3D" id="WorldBoundaryShape3D_6xxch"]
|
[sub_resource type="WorldBoundaryShape3D" id="WorldBoundaryShape3D_6xxch"]
|
||||||
|
|
||||||
[sub_resource type="PlaneMesh" id="PlaneMesh_qporw"]
|
[sub_resource type="ShaderMaterial" id="ShaderMaterial_qof1c"]
|
||||||
size = Vector2(500, 500)
|
render_priority = 0
|
||||||
|
shader = ExtResource("1_ggga8")
|
||||||
|
|
||||||
[sub_resource type="StandardMaterial3D" id="StandardMaterial3D_wl7tr"]
|
[sub_resource type="PlaneMesh" id="PlaneMesh_1obgk"]
|
||||||
albedo_color = Color(0.240374, 0.221831, 0.221831, 1)
|
material = SubResource("ShaderMaterial_qof1c")
|
||||||
metallic_specular = 0.0
|
size = Vector2(200, 200)
|
||||||
|
|
||||||
[node name="RunDownBuilding" type="Node3D"]
|
[node name="RunDownBuilding" type="Node3D"]
|
||||||
|
|
||||||
[node name="Ground" type="StaticBody3D" parent="." groups=["ResetSurface"]]
|
[node name="Ground" type="StaticBody3D" parent="." groups=["Ground"]]
|
||||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 100)
|
|
||||||
|
|
||||||
[node name="CollisionShape3D" type="CollisionShape3D" parent="Ground"]
|
[node name="CollisionShape3D" type="CollisionShape3D" parent="Ground"]
|
||||||
shape = SubResource("WorldBoundaryShape3D_6xxch")
|
shape = SubResource("WorldBoundaryShape3D_6xxch")
|
||||||
|
|
||||||
[node name="MeshInstance3D" type="MeshInstance3D" parent="Ground"]
|
[node name="MeshInstance3D" type="MeshInstance3D" parent="Ground"]
|
||||||
mesh = SubResource("PlaneMesh_qporw")
|
mesh = SubResource("PlaneMesh_1obgk")
|
||||||
surface_material_override/0 = SubResource("StandardMaterial3D_wl7tr")
|
|
||||||
|
|
||||||
[node name="Sketchfab_Scene" parent="." instance=ExtResource("2_orjp2")]
|
[node name="Sketchfab_Scene" parent="." instance=ExtResource("2_orjp2")]
|
||||||
transform = Transform3D(4, 0, 0, 0, 4, 0, 0, 0, 4, 0, -12.243, 100)
|
transform = Transform3D(1.5, 0, 0, 0, 1.5, 0, 0, 0, 1.5, 0, -4.57199, 0)
|
||||||
|
|||||||
@@ -14,7 +14,7 @@ size = Vector2(100, 100)
|
|||||||
|
|
||||||
[node name="TestLevel" type="Node3D"]
|
[node name="TestLevel" type="Node3D"]
|
||||||
|
|
||||||
[node name="Ground" type="StaticBody3D" parent="." groups=["ResetSurface"]]
|
[node name="Ground" type="StaticBody3D" parent="." groups=["Ground"]]
|
||||||
|
|
||||||
[node name="CollisionShape3D" type="CollisionShape3D" parent="Ground"]
|
[node name="CollisionShape3D" type="CollisionShape3D" parent="Ground"]
|
||||||
shape = SubResource("WorldBoundaryShape3D_bpckr")
|
shape = SubResource("WorldBoundaryShape3D_bpckr")
|
||||||
|
|||||||
@@ -1,16 +1,13 @@
|
|||||||
[gd_scene load_steps=20 format=3 uid="uid://deah8x3tnm045"]
|
[gd_scene load_steps=13 format=3 uid="uid://deah8x3tnm045"]
|
||||||
|
|
||||||
[ext_resource type="Texture2D" uid="uid://b3ecco3iykmlc" path="res://assets/textures/overcast_soil_puresky_4k.hdr" id="1_4mr0e"]
|
[ext_resource type="Texture2D" uid="uid://b3ecco3iykmlc" path="res://assets/textures/overcast_soil_puresky_4k.hdr" id="1_4mr0e"]
|
||||||
[ext_resource type="Script" path="res://core/scripts/main.gd" id="1_eewwe"]
|
[ext_resource type="PackedScene" uid="uid://dwvmna8qc0vb4" path="res://core/drone/drone.tscn" id="2_orkyq"]
|
||||||
[ext_resource type="Script" path="res://core/scripts/camera_3d.gd" id="3_sec6q"]
|
[ext_resource type="Script" path="res://core/scripts/camera_3d.gd" id="3_sec6q"]
|
||||||
[ext_resource type="Script" path="res://core/scripts/los_view.gd" id="3_supaf"]
|
[ext_resource type="Script" path="res://core/scripts/los_view.gd" id="3_supaf"]
|
||||||
[ext_resource type="Texture2D" uid="uid://c7ldlo5qe26tx" path="res://assets/textures/drone_screenshot.png" id="4_0ftx7"]
|
[ext_resource type="Texture2D" uid="uid://c7ldlo5qe26tx" path="res://assets/textures/drone_screenshot.png" id="4_0ftx7"]
|
||||||
[ext_resource type="Script" path="res://core/scripts/main_menu.gd" id="4_bknjq"]
|
[ext_resource type="Script" path="res://core/scripts/main_menu.gd" id="4_bknjq"]
|
||||||
|
[ext_resource type="PackedScene" uid="uid://ctnwdiavrytwe" path="res://core/levels/contruction_site.tscn" id="4_oqdxa"]
|
||||||
[ext_resource type="Script" path="res://core/scripts/pause_menu.gd" id="7_b8wfm"]
|
[ext_resource type="Script" path="res://core/scripts/pause_menu.gd" id="7_b8wfm"]
|
||||||
[ext_resource type="Script" path="res://core/scripts/map_selection.gd" id="9_m0h3c"]
|
|
||||||
[ext_resource type="PackedScene" uid="uid://ctnwdiavrytwe" path="res://core/levels/construction_site.tscn" id="9_uh1ro"]
|
|
||||||
[ext_resource type="PackedScene" uid="uid://5ht1wfq36328" path="res://core/levels/run_down_building.tscn" id="10_u57pm"]
|
|
||||||
[ext_resource type="PackedScene" uid="uid://7umhe6bcjv4v" path="res://core/levels/abstract.tscn" id="11_nccjd"]
|
|
||||||
|
|
||||||
[sub_resource type="PanoramaSkyMaterial" id="PanoramaSkyMaterial_qks7v"]
|
[sub_resource type="PanoramaSkyMaterial" id="PanoramaSkyMaterial_qks7v"]
|
||||||
panorama = ExtResource("1_4mr0e")
|
panorama = ExtResource("1_4mr0e")
|
||||||
@@ -32,20 +29,7 @@ bake_resolution = 1
|
|||||||
_data = [Vector2(0, 90), 0.0, -220.055, 0, 0, Vector2(0.0753138, 59.5526), -282.238, -282.238, 0, 0, Vector2(0.449093, 7.72959), -32.7953, -32.7953, 0, 0, Vector2(0.994421, 1), -7.74656, 0.0, 0, 0]
|
_data = [Vector2(0, 90), 0.0, -220.055, 0, 0, Vector2(0.0753138, 59.5526), -282.238, -282.238, 0, 0, Vector2(0.449093, 7.72959), -32.7953, -32.7953, 0, 0, Vector2(0.994421, 1), -7.74656, 0.0, 0, 0]
|
||||||
point_count = 4
|
point_count = 4
|
||||||
|
|
||||||
[sub_resource type="LabelSettings" id="LabelSettings_rjteo"]
|
[node name="Main" type="Node3D"]
|
||||||
shadow_color = Color(0, 0, 0, 0.611765)
|
|
||||||
|
|
||||||
[sub_resource type="LabelSettings" id="LabelSettings_ymk35"]
|
|
||||||
shadow_color = Color(0, 0, 0, 0.611765)
|
|
||||||
|
|
||||||
[sub_resource type="StyleBoxTexture" id="StyleBoxTexture_b4xxx"]
|
|
||||||
|
|
||||||
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_pg658"]
|
|
||||||
bg_color = Color(0, 0, 0, 0)
|
|
||||||
|
|
||||||
[node name="Main" type="Node3D" node_paths=PackedStringArray("reset_point")]
|
|
||||||
script = ExtResource("1_eewwe")
|
|
||||||
reset_point = NodePath("ResetPoint")
|
|
||||||
|
|
||||||
[node name="DirectionalLight3D" type="DirectionalLight3D" parent="."]
|
[node name="DirectionalLight3D" type="DirectionalLight3D" parent="."]
|
||||||
transform = Transform3D(-0.924804, -0.329475, 0.190221, 1.47562e-08, 0.499998, 0.866027, -0.380444, 0.800905, -0.4624, 0, 0, 0)
|
transform = Transform3D(-0.924804, -0.329475, 0.190221, 1.47562e-08, 0.499998, 0.866027, -0.380444, 0.800905, -0.4624, 0, 0, 0)
|
||||||
@@ -59,12 +43,17 @@ shadow_blur = 4.542
|
|||||||
environment = SubResource("Environment_ruppb")
|
environment = SubResource("Environment_ruppb")
|
||||||
|
|
||||||
[node name="ResetPoint" type="Marker3D" parent="."]
|
[node name="ResetPoint" type="Marker3D" parent="."]
|
||||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0.117014, 0)
|
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0.017014, 0)
|
||||||
|
|
||||||
[node name="LOSView" type="Node3D" parent="." node_paths=PackedStringArray("child_camera")]
|
[node name="Drone" parent="ResetPoint" node_paths=PackedStringArray("reset_point") instance=ExtResource("2_orkyq")]
|
||||||
|
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 984.979, 0)
|
||||||
|
reset_point = NodePath("..")
|
||||||
|
|
||||||
|
[node name="LOSView" type="Node3D" parent="." node_paths=PackedStringArray("drone", "child_camera")]
|
||||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -1.23896, 0.638642, -1.134)
|
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -1.23896, 0.638642, -1.134)
|
||||||
script = ExtResource("3_supaf")
|
script = ExtResource("3_supaf")
|
||||||
zoom_curve = SubResource("Curve_nxnkk")
|
zoom_curve = SubResource("Curve_nxnkk")
|
||||||
|
drone = NodePath("../ResetPoint/Drone")
|
||||||
child_camera = NodePath("LOSCamera3D")
|
child_camera = NodePath("LOSCamera3D")
|
||||||
|
|
||||||
[node name="LOSCamera3D" type="Camera3D" parent="LOSView"]
|
[node name="LOSCamera3D" type="Camera3D" parent="LOSView"]
|
||||||
@@ -76,7 +65,7 @@ script = ExtResource("3_sec6q")
|
|||||||
process_mode = 3
|
process_mode = 3
|
||||||
layer = 2
|
layer = 2
|
||||||
|
|
||||||
[node name="MainMenu" type="Control" parent="CanvasLayer" node_paths=PackedStringArray("start_button", "quit_button", "controller_mode_button", "joy_controller_label", "fpv_remote_label", "map_selection_menu")]
|
[node name="MainMenu" type="Control" parent="CanvasLayer" node_paths=PackedStringArray("start_button", "quit_button")]
|
||||||
layout_mode = 3
|
layout_mode = 3
|
||||||
anchors_preset = 15
|
anchors_preset = 15
|
||||||
anchor_right = 1.0
|
anchor_right = 1.0
|
||||||
@@ -86,10 +75,6 @@ grow_vertical = 2
|
|||||||
script = ExtResource("4_bknjq")
|
script = ExtResource("4_bknjq")
|
||||||
start_button = NodePath("HBoxContainer/VBoxContainer/MarginContainer/VBoxContainer/StartButton")
|
start_button = NodePath("HBoxContainer/VBoxContainer/MarginContainer/VBoxContainer/StartButton")
|
||||||
quit_button = NodePath("HBoxContainer/VBoxContainer/MarginContainer/VBoxContainer/QuitButton")
|
quit_button = NodePath("HBoxContainer/VBoxContainer/MarginContainer/VBoxContainer/QuitButton")
|
||||||
controller_mode_button = NodePath("HBoxContainer/VBoxContainer/MarginContainer/VBoxContainer/HBoxContainer/ControllerModeButton")
|
|
||||||
joy_controller_label = NodePath("HBoxContainer/VBoxContainer/MarginContainer/VBoxContainer/HBoxContainer/JoyControllerLabel")
|
|
||||||
fpv_remote_label = NodePath("HBoxContainer/VBoxContainer/MarginContainer/VBoxContainer/HBoxContainer/FPVRemoteLabel")
|
|
||||||
map_selection_menu = NodePath("../MapSelection")
|
|
||||||
|
|
||||||
[node name="TextureRect" type="TextureRect" parent="CanvasLayer/MainMenu"]
|
[node name="TextureRect" type="TextureRect" parent="CanvasLayer/MainMenu"]
|
||||||
layout_mode = 1
|
layout_mode = 1
|
||||||
@@ -116,7 +101,7 @@ alignment = 1
|
|||||||
|
|
||||||
[node name="MarginContainer" type="MarginContainer" parent="CanvasLayer/MainMenu/HBoxContainer/VBoxContainer"]
|
[node name="MarginContainer" type="MarginContainer" parent="CanvasLayer/MainMenu/HBoxContainer/VBoxContainer"]
|
||||||
layout_mode = 2
|
layout_mode = 2
|
||||||
theme_override_constants/margin_right = 65
|
theme_override_constants/margin_right = 150
|
||||||
|
|
||||||
[node name="VBoxContainer" type="VBoxContainer" parent="CanvasLayer/MainMenu/HBoxContainer/VBoxContainer/MarginContainer"]
|
[node name="VBoxContainer" type="VBoxContainer" parent="CanvasLayer/MainMenu/HBoxContainer/VBoxContainer/MarginContainer"]
|
||||||
layout_mode = 2
|
layout_mode = 2
|
||||||
@@ -125,36 +110,13 @@ alignment = 1
|
|||||||
|
|
||||||
[node name="StartButton" type="Button" parent="CanvasLayer/MainMenu/HBoxContainer/VBoxContainer/MarginContainer/VBoxContainer"]
|
[node name="StartButton" type="Button" parent="CanvasLayer/MainMenu/HBoxContainer/VBoxContainer/MarginContainer/VBoxContainer"]
|
||||||
layout_mode = 2
|
layout_mode = 2
|
||||||
focus_neighbor_bottom = NodePath("../HBoxContainer/ControllerModeButton")
|
focus_neighbor_bottom = NodePath("../QuitButton")
|
||||||
theme_override_font_sizes/font_size = 50
|
theme_override_font_sizes/font_size = 50
|
||||||
text = "START"
|
text = "START"
|
||||||
|
|
||||||
[node name="HBoxContainer" type="HBoxContainer" parent="CanvasLayer/MainMenu/HBoxContainer/VBoxContainer/MarginContainer/VBoxContainer"]
|
|
||||||
layout_mode = 2
|
|
||||||
alignment = 1
|
|
||||||
|
|
||||||
[node name="JoyControllerLabel" type="Label" parent="CanvasLayer/MainMenu/HBoxContainer/VBoxContainer/MarginContainer/VBoxContainer/HBoxContainer"]
|
|
||||||
self_modulate = Color(0, 1, 0, 1)
|
|
||||||
layout_mode = 2
|
|
||||||
text = "JOY CONTROLLER"
|
|
||||||
label_settings = SubResource("LabelSettings_rjteo")
|
|
||||||
|
|
||||||
[node name="ControllerModeButton" type="CheckButton" parent="CanvasLayer/MainMenu/HBoxContainer/VBoxContainer/MarginContainer/VBoxContainer/HBoxContainer"]
|
|
||||||
layout_mode = 2
|
|
||||||
focus_neighbor_top = NodePath("../../StartButton")
|
|
||||||
focus_neighbor_bottom = NodePath("../../QuitButton")
|
|
||||||
alignment = 1
|
|
||||||
icon_alignment = 1
|
|
||||||
|
|
||||||
[node name="FPVRemoteLabel" type="Label" parent="CanvasLayer/MainMenu/HBoxContainer/VBoxContainer/MarginContainer/VBoxContainer/HBoxContainer"]
|
|
||||||
self_modulate = Color(0.498039, 0.498039, 0.498039, 1)
|
|
||||||
layout_mode = 2
|
|
||||||
text = "FPV REMOTE"
|
|
||||||
label_settings = SubResource("LabelSettings_ymk35")
|
|
||||||
|
|
||||||
[node name="QuitButton" type="Button" parent="CanvasLayer/MainMenu/HBoxContainer/VBoxContainer/MarginContainer/VBoxContainer"]
|
[node name="QuitButton" type="Button" parent="CanvasLayer/MainMenu/HBoxContainer/VBoxContainer/MarginContainer/VBoxContainer"]
|
||||||
layout_mode = 2
|
layout_mode = 2
|
||||||
focus_neighbor_top = NodePath("../HBoxContainer/ControllerModeButton")
|
focus_neighbor_top = NodePath("../StartButton")
|
||||||
theme_override_font_sizes/font_size = 50
|
theme_override_font_sizes/font_size = 50
|
||||||
text = "QUIT"
|
text = "QUIT"
|
||||||
|
|
||||||
@@ -219,118 +181,4 @@ layout_mode = 2
|
|||||||
theme_override_font_sizes/font_size = 25
|
theme_override_font_sizes/font_size = 25
|
||||||
text = "QUIT"
|
text = "QUIT"
|
||||||
|
|
||||||
[node name="MapSelection" type="Control" parent="CanvasLayer" node_paths=PackedStringArray("construction_site_button", "run_down_building_button", "abstract_button", "start_button")]
|
[node name="TestLevel" parent="." instance=ExtResource("4_oqdxa")]
|
||||||
visible = false
|
|
||||||
layout_mode = 3
|
|
||||||
anchors_preset = 15
|
|
||||||
anchor_right = 1.0
|
|
||||||
anchor_bottom = 1.0
|
|
||||||
grow_horizontal = 2
|
|
||||||
grow_vertical = 2
|
|
||||||
script = ExtResource("9_m0h3c")
|
|
||||||
construction_site_button = NodePath("GridContainer/Panel/ConstructionSiteButton")
|
|
||||||
run_down_building_button = NodePath("GridContainer/Panel2/RunDownBuildingButton")
|
|
||||||
abstract_button = NodePath("GridContainer/Panel3/AbstractButton")
|
|
||||||
start_button = NodePath("HBoxContainer/VBoxContainer/MarginContainer/StartButton")
|
|
||||||
construction_site_scene = ExtResource("9_uh1ro")
|
|
||||||
run_down_building_scene = ExtResource("10_u57pm")
|
|
||||||
abstract_scene = ExtResource("11_nccjd")
|
|
||||||
|
|
||||||
[node name="ColorRect" type="ColorRect" parent="CanvasLayer/MapSelection"]
|
|
||||||
layout_mode = 1
|
|
||||||
anchors_preset = 15
|
|
||||||
anchor_right = 1.0
|
|
||||||
anchor_bottom = 1.0
|
|
||||||
grow_horizontal = 2
|
|
||||||
grow_vertical = 2
|
|
||||||
color = Color(0.262932, 0.262932, 0.262932, 1)
|
|
||||||
|
|
||||||
[node name="GridContainer" type="GridContainer" parent="CanvasLayer/MapSelection"]
|
|
||||||
layout_mode = 2
|
|
||||||
offset_left = 236.0
|
|
||||||
offset_top = 274.0
|
|
||||||
offset_right = 916.0
|
|
||||||
offset_bottom = 374.0
|
|
||||||
grow_horizontal = 2
|
|
||||||
grow_vertical = 2
|
|
||||||
size_flags_horizontal = 4
|
|
||||||
size_flags_vertical = 4
|
|
||||||
theme_override_constants/h_separation = 40
|
|
||||||
theme_override_constants/v_separation = 40
|
|
||||||
columns = 3
|
|
||||||
|
|
||||||
[node name="Panel" type="Panel" parent="CanvasLayer/MapSelection/GridContainer"]
|
|
||||||
custom_minimum_size = Vector2(200, 100)
|
|
||||||
layout_mode = 2
|
|
||||||
theme_override_styles/panel = SubResource("StyleBoxTexture_b4xxx")
|
|
||||||
|
|
||||||
[node name="ConstructionSiteButton" type="Button" parent="CanvasLayer/MapSelection/GridContainer/Panel"]
|
|
||||||
layout_mode = 1
|
|
||||||
anchors_preset = 15
|
|
||||||
anchor_right = 1.0
|
|
||||||
anchor_bottom = 1.0
|
|
||||||
grow_horizontal = 2
|
|
||||||
grow_vertical = 2
|
|
||||||
focus_neighbor_right = NodePath("../../Panel2/RunDownBuildingButton")
|
|
||||||
focus_neighbor_bottom = NodePath("../../../HBoxContainer/VBoxContainer/MarginContainer/StartButton")
|
|
||||||
text = "Construction Site"
|
|
||||||
|
|
||||||
[node name="Panel2" type="Panel" parent="CanvasLayer/MapSelection/GridContainer"]
|
|
||||||
custom_minimum_size = Vector2(200, 100)
|
|
||||||
layout_mode = 2
|
|
||||||
theme_override_styles/panel = SubResource("StyleBoxFlat_pg658")
|
|
||||||
|
|
||||||
[node name="RunDownBuildingButton" type="Button" parent="CanvasLayer/MapSelection/GridContainer/Panel2"]
|
|
||||||
layout_mode = 1
|
|
||||||
anchors_preset = 15
|
|
||||||
anchor_right = 1.0
|
|
||||||
anchor_bottom = 1.0
|
|
||||||
grow_horizontal = 2
|
|
||||||
grow_vertical = 2
|
|
||||||
focus_neighbor_left = NodePath("../../Panel/ConstructionSiteButton")
|
|
||||||
focus_neighbor_right = NodePath("../../Panel3/AbstractButton")
|
|
||||||
focus_neighbor_bottom = NodePath("../../../HBoxContainer/VBoxContainer/MarginContainer/StartButton")
|
|
||||||
text = "Run Down Building"
|
|
||||||
|
|
||||||
[node name="Panel3" type="Panel" parent="CanvasLayer/MapSelection/GridContainer"]
|
|
||||||
custom_minimum_size = Vector2(200, 100)
|
|
||||||
layout_mode = 2
|
|
||||||
theme_override_styles/panel = SubResource("StyleBoxFlat_pg658")
|
|
||||||
|
|
||||||
[node name="AbstractButton" type="Button" parent="CanvasLayer/MapSelection/GridContainer/Panel3"]
|
|
||||||
layout_mode = 1
|
|
||||||
anchors_preset = 15
|
|
||||||
anchor_right = 1.0
|
|
||||||
anchor_bottom = 1.0
|
|
||||||
grow_horizontal = 2
|
|
||||||
grow_vertical = 2
|
|
||||||
focus_neighbor_left = NodePath("../../Panel2/RunDownBuildingButton")
|
|
||||||
focus_neighbor_right = NodePath("../../../HBoxContainer/VBoxContainer/MarginContainer/StartButton")
|
|
||||||
focus_neighbor_bottom = NodePath("../../../HBoxContainer/VBoxContainer/MarginContainer/StartButton")
|
|
||||||
text = "Abstract"
|
|
||||||
|
|
||||||
[node name="HBoxContainer" type="HBoxContainer" parent="CanvasLayer/MapSelection"]
|
|
||||||
layout_mode = 1
|
|
||||||
anchors_preset = 15
|
|
||||||
anchor_right = 1.0
|
|
||||||
anchor_bottom = 1.0
|
|
||||||
grow_horizontal = 2
|
|
||||||
grow_vertical = 2
|
|
||||||
alignment = 2
|
|
||||||
|
|
||||||
[node name="VBoxContainer" type="VBoxContainer" parent="CanvasLayer/MapSelection/HBoxContainer"]
|
|
||||||
layout_mode = 2
|
|
||||||
alignment = 2
|
|
||||||
|
|
||||||
[node name="MarginContainer" type="MarginContainer" parent="CanvasLayer/MapSelection/HBoxContainer/VBoxContainer"]
|
|
||||||
layout_mode = 2
|
|
||||||
theme_override_constants/margin_right = 40
|
|
||||||
theme_override_constants/margin_bottom = 30
|
|
||||||
|
|
||||||
[node name="StartButton" type="Button" parent="CanvasLayer/MapSelection/HBoxContainer/VBoxContainer/MarginContainer"]
|
|
||||||
custom_minimum_size = Vector2(200, 50)
|
|
||||||
layout_mode = 2
|
|
||||||
focus_neighbor_top = NodePath("../../../../GridContainer/Panel3/AbstractButton")
|
|
||||||
text = "START"
|
|
||||||
|
|
||||||
[connection signal="toggled" from="CanvasLayer/MainMenu/HBoxContainer/VBoxContainer/MarginContainer/VBoxContainer/HBoxContainer/ControllerModeButton" to="CanvasLayer/MainMenu" method="_on_controller_mode_button_toggled"]
|
|
||||||
|
|||||||
@@ -1,19 +0,0 @@
|
|||||||
shader_type canvas_item;
|
|
||||||
uniform sampler2D screen_texture : hint_screen_texture, repeat_disable, filter_nearest;
|
|
||||||
uniform float fisheye_strength = 1.0; // Control the fisheye effect strength
|
|
||||||
vec2 fisheye(vec2 uv) {
|
|
||||||
vec2 d = uv - 0.5;
|
|
||||||
float r = length(d);
|
|
||||||
float theta = atan(d.y, d.x);
|
|
||||||
float rf = pow(r, fisheye_strength) / pow(0.5, fisheye_strength - 1.0);
|
|
||||||
return vec2(0.5) + rf * normalize(d);
|
|
||||||
}
|
|
||||||
void fragment() {
|
|
||||||
vec2 iResolution = 1.0 / SCREEN_PIXEL_SIZE;
|
|
||||||
vec2 q = FRAGCOORD.xy / iResolution.xy;
|
|
||||||
|
|
||||||
// Apply fisheye distortion
|
|
||||||
q = fisheye(q);
|
|
||||||
vec3 col = texture(screen_texture, q).rgb;
|
|
||||||
COLOR = vec4(col, 1.0);
|
|
||||||
}
|
|
||||||
@@ -28,7 +28,7 @@ function = 1
|
|||||||
input_name = "uv"
|
input_name = "uv"
|
||||||
|
|
||||||
[sub_resource type="VisualShaderNodeFloatConstant" id="VisualShaderNodeFloatConstant_ygstf"]
|
[sub_resource type="VisualShaderNodeFloatConstant" id="VisualShaderNodeFloatConstant_ygstf"]
|
||||||
constant = 100.0
|
constant = 50.0
|
||||||
|
|
||||||
[sub_resource type="FastNoiseLite" id="FastNoiseLite_5ogwx"]
|
[sub_resource type="FastNoiseLite" id="FastNoiseLite_5ogwx"]
|
||||||
noise_type = 2
|
noise_type = 2
|
||||||
@@ -93,7 +93,7 @@ void fragment() {
|
|||||||
|
|
||||||
|
|
||||||
// FloatConstant:25
|
// FloatConstant:25
|
||||||
float n_out25p0 = 100.000000;
|
float n_out25p0 = 50.000000;
|
||||||
|
|
||||||
|
|
||||||
// UVFunc:23
|
// UVFunc:23
|
||||||
@@ -178,7 +178,6 @@ void fragment() {
|
|||||||
|
|
||||||
}
|
}
|
||||||
"
|
"
|
||||||
graph_offset = Vector2(-1734.9, 193.248)
|
|
||||||
nodes/fragment/0/position = Vector2(1000, 220)
|
nodes/fragment/0/position = Vector2(1000, 220)
|
||||||
nodes/fragment/19/node = SubResource("VisualShaderNodeVec2Constant_0gqw2")
|
nodes/fragment/19/node = SubResource("VisualShaderNodeVec2Constant_0gqw2")
|
||||||
nodes/fragment/19/position = Vector2(-2120, 580)
|
nodes/fragment/19/position = Vector2(-2120, 580)
|
||||||
|
|||||||
@@ -1,21 +1,13 @@
|
|||||||
extends Node3D
|
extends Node3D
|
||||||
|
|
||||||
var selected_drone: PackedScene
|
|
||||||
var camera_array: Array[Camera3D] = []
|
@export var camera_array: Array[Camera3D] = []
|
||||||
var current_camera: int = 0
|
@export var current_camera: int = 0
|
||||||
var game_started: bool = false
|
@export var game_started: bool = false
|
||||||
var is_paused: bool = false
|
@export var is_paused: bool = false
|
||||||
var controller_mode: String = "JoyController"
|
|
||||||
var selected_map: PackedScene
|
|
||||||
var drone_instance: Drone
|
|
||||||
var reset_point: Marker3D
|
|
||||||
|
|
||||||
|
|
||||||
func _ready():
|
func _process(delta):
|
||||||
selected_drone = load("res://core/drone/drone.tscn")
|
|
||||||
|
|
||||||
|
|
||||||
func _process(_delta):
|
|
||||||
if camera_array.size() != 0 and Input.is_action_just_released("change_camera_view"):
|
if camera_array.size() != 0 and Input.is_action_just_released("change_camera_view"):
|
||||||
current_camera += 1
|
current_camera += 1
|
||||||
if current_camera <= camera_array.size() - 1:
|
if current_camera <= camera_array.size() - 1:
|
||||||
@@ -27,18 +19,4 @@ func _process(_delta):
|
|||||||
|
|
||||||
|
|
||||||
func start_game():
|
func start_game():
|
||||||
if selected_map != null:
|
|
||||||
var map_instance = selected_map.instantiate()
|
|
||||||
get_tree().root.get_node("Main").add_child(map_instance)
|
|
||||||
_spawn_drone()
|
|
||||||
game_started = true
|
game_started = true
|
||||||
else:
|
|
||||||
print("ERROR: selected_map is null")
|
|
||||||
|
|
||||||
|
|
||||||
func _spawn_drone():
|
|
||||||
if selected_drone != null:
|
|
||||||
drone_instance = selected_drone.instantiate()
|
|
||||||
get_tree().root.get_node("Main/ResetPoint/").add_child(drone_instance)
|
|
||||||
else:
|
|
||||||
print("ERROR: selected_drone is null")
|
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
extends Node3D
|
extends Node3D
|
||||||
|
|
||||||
@export var zoom_curve: Curve
|
@export var zoom_curve: Curve
|
||||||
|
@export var drone: RigidBody3D
|
||||||
@export var child_camera: Camera3D
|
@export var child_camera: Camera3D
|
||||||
|
|
||||||
var dist_to_drone: float = 0.0
|
var dist_to_drone: float = 0.0
|
||||||
@@ -10,11 +11,10 @@ func _ready():
|
|||||||
child_camera = get_child(0)
|
child_camera = get_child(0)
|
||||||
|
|
||||||
|
|
||||||
func _physics_process(_delta):
|
func _physics_process(delta):
|
||||||
if GameManager.drone_instance != null:
|
look_at(drone.global_position)
|
||||||
look_at(GameManager.drone_instance.global_position)
|
|
||||||
|
|
||||||
dist_to_drone = global_position.distance_to(GameManager.drone_instance.global_position)
|
dist_to_drone = global_position.distance_to(drone.global_position)
|
||||||
|
|
||||||
child_camera.fov = zoom_curve.sample((dist_to_drone-1)/89)
|
child_camera.fov = zoom_curve.sample((dist_to_drone-1)/89)
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +0,0 @@
|
|||||||
extends Node3D
|
|
||||||
|
|
||||||
@export var reset_point: Marker3D
|
|
||||||
|
|
||||||
|
|
||||||
func _ready():
|
|
||||||
GameManager.reset_point = reset_point
|
|
||||||
@@ -2,10 +2,6 @@ extends Control
|
|||||||
|
|
||||||
@export var start_button: Button
|
@export var start_button: Button
|
||||||
@export var quit_button: Button
|
@export var quit_button: Button
|
||||||
@export var controller_mode_button: CheckButton
|
|
||||||
@export var joy_controller_label: Label
|
|
||||||
@export var fpv_remote_label: Label
|
|
||||||
@export var map_selection_menu: Control
|
|
||||||
|
|
||||||
|
|
||||||
func _ready():
|
func _ready():
|
||||||
@@ -17,7 +13,7 @@ func _ready():
|
|||||||
|
|
||||||
func _on_start_button_pressed():
|
func _on_start_button_pressed():
|
||||||
hide()
|
hide()
|
||||||
map_selection_menu.show()
|
GameManager.start_game()
|
||||||
|
|
||||||
|
|
||||||
func _on_quit_button_pressed():
|
func _on_quit_button_pressed():
|
||||||
@@ -27,14 +23,3 @@ func _on_quit_button_pressed():
|
|||||||
func _on_visibility_changed() -> void:
|
func _on_visibility_changed() -> void:
|
||||||
if visible:
|
if visible:
|
||||||
start_button.grab_focus()
|
start_button.grab_focus()
|
||||||
|
|
||||||
|
|
||||||
func _on_controller_mode_button_toggled(toggled_on):
|
|
||||||
if toggled_on:
|
|
||||||
GameManager.controller_mode = "FPVRemote"
|
|
||||||
joy_controller_label.self_modulate = Color(0.5, 0.5, 0.5, 1.0)
|
|
||||||
fpv_remote_label.self_modulate = Color(0.0, 1.0, 0.0, 1.0)
|
|
||||||
elif !toggled_on:
|
|
||||||
GameManager.controller_mode = "JoyController"
|
|
||||||
joy_controller_label.self_modulate = Color(0.0, 1.0, 0.0, 1.0)
|
|
||||||
fpv_remote_label.self_modulate = Color(0.5, 0.5, 0.5, 1.0)
|
|
||||||
|
|||||||
@@ -1,43 +0,0 @@
|
|||||||
extends Control
|
|
||||||
|
|
||||||
@export var construction_site_button: Button
|
|
||||||
@export var run_down_building_button: Button
|
|
||||||
@export var abstract_button: Button
|
|
||||||
@export var start_button: Button
|
|
||||||
@export var construction_site_scene: PackedScene
|
|
||||||
@export var run_down_building_scene: PackedScene
|
|
||||||
@export var abstract_scene: PackedScene
|
|
||||||
var selected_map_key: int = 0
|
|
||||||
|
|
||||||
|
|
||||||
func _ready():
|
|
||||||
construction_site_button.pressed.connect(_on_construction_site_button_pressed)
|
|
||||||
run_down_building_button.pressed.connect(_on_run_down_building_button_pressed)
|
|
||||||
abstract_button.pressed.connect(_on_abstract_button_pressed)
|
|
||||||
start_button.pressed.connect(_on_start_button_pressed)
|
|
||||||
self.visibility_changed.connect(_on_visibility_changed)
|
|
||||||
|
|
||||||
|
|
||||||
func _on_construction_site_button_pressed():
|
|
||||||
selected_map_key = 1
|
|
||||||
GameManager.selected_map = construction_site_scene
|
|
||||||
|
|
||||||
|
|
||||||
func _on_run_down_building_button_pressed():
|
|
||||||
selected_map_key = 2
|
|
||||||
GameManager.selected_map = run_down_building_scene
|
|
||||||
|
|
||||||
|
|
||||||
func _on_abstract_button_pressed():
|
|
||||||
selected_map_key = 3
|
|
||||||
GameManager.selected_map = abstract_scene
|
|
||||||
|
|
||||||
|
|
||||||
func _on_start_button_pressed():
|
|
||||||
GameManager.start_game()
|
|
||||||
hide()
|
|
||||||
|
|
||||||
|
|
||||||
func _on_visibility_changed() -> void:
|
|
||||||
if visible:
|
|
||||||
construction_site_button.grab_focus()
|
|
||||||
@@ -20,7 +20,7 @@ func _on_quit_button_pressed():
|
|||||||
get_tree().quit()
|
get_tree().quit()
|
||||||
|
|
||||||
|
|
||||||
func _input(_event: InputEvent) -> void:
|
func _input(event: InputEvent) -> void:
|
||||||
if Input.is_action_just_pressed("start") and !GameManager.is_paused and GameManager.game_started:
|
if Input.is_action_just_pressed("start") and !GameManager.is_paused and GameManager.game_started:
|
||||||
_toggle_pause_state(true)
|
_toggle_pause_state(true)
|
||||||
elif Input.is_action_just_pressed("start") and GameManager.is_paused:
|
elif Input.is_action_just_pressed("start") and GameManager.is_paused:
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
extends Label
|
extends Label
|
||||||
|
|
||||||
|
|
||||||
func _process(_delta):
|
func _process(delta):
|
||||||
text = str(Engine.get_frames_per_second()) + " FPS"
|
text = str(Engine.get_frames_per_second()) + " FPS"
|
||||||
|
|||||||
@@ -1,64 +0,0 @@
|
|||||||
[preset.0]
|
|
||||||
|
|
||||||
name="Windows Desktop"
|
|
||||||
platform="Windows Desktop"
|
|
||||||
runnable=true
|
|
||||||
advanced_options=false
|
|
||||||
dedicated_server=false
|
|
||||||
custom_features=""
|
|
||||||
export_filter="all_resources"
|
|
||||||
include_filter=""
|
|
||||||
exclude_filter=""
|
|
||||||
export_path=""
|
|
||||||
encryption_include_filters=""
|
|
||||||
encryption_exclude_filters=""
|
|
||||||
encrypt_pck=false
|
|
||||||
encrypt_directory=false
|
|
||||||
script_export_mode=2
|
|
||||||
|
|
||||||
[preset.0.options]
|
|
||||||
|
|
||||||
custom_template/debug=""
|
|
||||||
custom_template/release=""
|
|
||||||
debug/export_console_wrapper=1
|
|
||||||
binary_format/embed_pck=true
|
|
||||||
texture_format/s3tc_bptc=true
|
|
||||||
texture_format/etc2_astc=false
|
|
||||||
binary_format/architecture="x86_64"
|
|
||||||
codesign/enable=false
|
|
||||||
codesign/timestamp=true
|
|
||||||
codesign/timestamp_server_url=""
|
|
||||||
codesign/digest_algorithm=1
|
|
||||||
codesign/description=""
|
|
||||||
codesign/custom_options=PackedStringArray()
|
|
||||||
application/modify_resources=true
|
|
||||||
application/icon="res://assets/textures/drone_screenshot.png"
|
|
||||||
application/console_wrapper_icon=""
|
|
||||||
application/icon_interpolation=4
|
|
||||||
application/file_version=""
|
|
||||||
application/product_version=""
|
|
||||||
application/company_name=""
|
|
||||||
application/product_name=""
|
|
||||||
application/file_description=""
|
|
||||||
application/copyright=""
|
|
||||||
application/trademarks=""
|
|
||||||
application/export_angle=0
|
|
||||||
application/export_d3d12=0
|
|
||||||
application/d3d12_agility_sdk_multiarch=true
|
|
||||||
ssh_remote_deploy/enabled=false
|
|
||||||
ssh_remote_deploy/host="user@host_ip"
|
|
||||||
ssh_remote_deploy/port="22"
|
|
||||||
ssh_remote_deploy/extra_args_ssh=""
|
|
||||||
ssh_remote_deploy/extra_args_scp=""
|
|
||||||
ssh_remote_deploy/run_script="Expand-Archive -LiteralPath '{temp_dir}\\{archive_name}' -DestinationPath '{temp_dir}'
|
|
||||||
$action = New-ScheduledTaskAction -Execute '{temp_dir}\\{exe_name}' -Argument '{cmd_args}'
|
|
||||||
$trigger = New-ScheduledTaskTrigger -Once -At 00:00
|
|
||||||
$settings = New-ScheduledTaskSettingsSet
|
|
||||||
$task = New-ScheduledTask -Action $action -Trigger $trigger -Settings $settings
|
|
||||||
Register-ScheduledTask godot_remote_debug -InputObject $task -Force:$true
|
|
||||||
Start-ScheduledTask -TaskName godot_remote_debug
|
|
||||||
while (Get-ScheduledTask -TaskName godot_remote_debug | ? State -eq running) { Start-Sleep -Milliseconds 100 }
|
|
||||||
Unregister-ScheduledTask -TaskName godot_remote_debug -Confirm:$false -ErrorAction:SilentlyContinue"
|
|
||||||
ssh_remote_deploy/cleanup_script="Stop-ScheduledTask -TaskName godot_remote_debug -ErrorAction:SilentlyContinue
|
|
||||||
Unregister-ScheduledTask -TaskName godot_remote_debug -Confirm:$false -ErrorAction:SilentlyContinue
|
|
||||||
Remove-Item -Recurse -Force '{temp_dir}'"
|
|
||||||
@@ -13,7 +13,7 @@ config_version=5
|
|||||||
config/name="Ya Mothers Flying Simulator"
|
config/name="Ya Mothers Flying Simulator"
|
||||||
run/main_scene="res://core/main/main.tscn"
|
run/main_scene="res://core/main/main.tscn"
|
||||||
config/features=PackedStringArray("4.3", "Forward Plus")
|
config/features=PackedStringArray("4.3", "Forward Plus")
|
||||||
config/icon="res://assets/textures/icon.png"
|
config/icon="res://icon.svg"
|
||||||
|
|
||||||
[autoload]
|
[autoload]
|
||||||
|
|
||||||
@@ -46,42 +46,42 @@ arm={
|
|||||||
"events": [Object(InputEventJoypadButton,"resource_local_to_scene":false,"resource_name":"","device":-1,"button_index":2,"pressure":0.0,"pressed":true,"script":null)
|
"events": [Object(InputEventJoypadButton,"resource_local_to_scene":false,"resource_name":"","device":-1,"button_index":2,"pressure":0.0,"pressed":true,"script":null)
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
joy_throttle_up={
|
throttle_up={
|
||||||
"deadzone": 0.5,
|
"deadzone": 0.5,
|
||||||
"events": [Object(InputEventJoypadMotion,"resource_local_to_scene":false,"resource_name":"","device":-1,"axis":1,"axis_value":-1.0,"script":null)
|
"events": [Object(InputEventJoypadMotion,"resource_local_to_scene":false,"resource_name":"","device":-1,"axis":1,"axis_value":-1.0,"script":null)
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
joy_roll_right={
|
roll_right={
|
||||||
"deadzone": 0.5,
|
"deadzone": 0.5,
|
||||||
"events": [Object(InputEventJoypadMotion,"resource_local_to_scene":false,"resource_name":"","device":-1,"axis":2,"axis_value":1.0,"script":null)
|
"events": [Object(InputEventJoypadMotion,"resource_local_to_scene":false,"resource_name":"","device":-1,"axis":2,"axis_value":1.0,"script":null)
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
joy_yaw_right={
|
yaw_right={
|
||||||
"deadzone": 0.5,
|
"deadzone": 0.5,
|
||||||
"events": [Object(InputEventJoypadMotion,"resource_local_to_scene":false,"resource_name":"","device":-1,"axis":0,"axis_value":1.0,"script":null)
|
"events": [Object(InputEventJoypadMotion,"resource_local_to_scene":false,"resource_name":"","device":-1,"axis":0,"axis_value":1.0,"script":null)
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
joy_pitch_forward={
|
pitch_forward={
|
||||||
"deadzone": 0.5,
|
"deadzone": 0.5,
|
||||||
"events": [Object(InputEventJoypadMotion,"resource_local_to_scene":false,"resource_name":"","device":-1,"axis":3,"axis_value":-1.0,"script":null)
|
"events": [Object(InputEventJoypadMotion,"resource_local_to_scene":false,"resource_name":"","device":-1,"axis":3,"axis_value":-1.0,"script":null)
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
joy_throttle_down={
|
throttle_down={
|
||||||
"deadzone": 0.5,
|
"deadzone": 0.5,
|
||||||
"events": [Object(InputEventJoypadMotion,"resource_local_to_scene":false,"resource_name":"","device":-1,"axis":1,"axis_value":1.0,"script":null)
|
"events": [Object(InputEventJoypadMotion,"resource_local_to_scene":false,"resource_name":"","device":-1,"axis":1,"axis_value":1.0,"script":null)
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
joy_yaw_left={
|
yaw_left={
|
||||||
"deadzone": 0.5,
|
"deadzone": 0.5,
|
||||||
"events": [Object(InputEventJoypadMotion,"resource_local_to_scene":false,"resource_name":"","device":-1,"axis":0,"axis_value":-1.0,"script":null)
|
"events": [Object(InputEventJoypadMotion,"resource_local_to_scene":false,"resource_name":"","device":-1,"axis":0,"axis_value":-1.0,"script":null)
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
joy_roll_left={
|
roll_left={
|
||||||
"deadzone": 0.5,
|
"deadzone": 0.5,
|
||||||
"events": [Object(InputEventJoypadMotion,"resource_local_to_scene":false,"resource_name":"","device":-1,"axis":2,"axis_value":-1.0,"script":null)
|
"events": [Object(InputEventJoypadMotion,"resource_local_to_scene":false,"resource_name":"","device":-1,"axis":2,"axis_value":-1.0,"script":null)
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
joy_pitch_backward={
|
pitch_backward={
|
||||||
"deadzone": 0.5,
|
"deadzone": 0.5,
|
||||||
"events": [Object(InputEventJoypadMotion,"resource_local_to_scene":false,"resource_name":"","device":-1,"axis":3,"axis_value":1.0,"script":null)
|
"events": [Object(InputEventJoypadMotion,"resource_local_to_scene":false,"resource_name":"","device":-1,"axis":3,"axis_value":1.0,"script":null)
|
||||||
]
|
]
|
||||||
|
|||||||
Reference in New Issue
Block a user