Compare commits

...

9 Commits

8 changed files with 158 additions and 14 deletions

View File

@@ -3,19 +3,20 @@
importer="texture" importer="texture"
type="CompressedTexture2D" type="CompressedTexture2D"
uid="uid://domgof2sjx7qt" uid="uid://domgof2sjx7qt"
path="res://.godot/imported/texture_08.svg-da494b7849979c6cd92e284fbb95bb9d.ctex" path.s3tc="res://.godot/imported/texture_08.svg-da494b7849979c6cd92e284fbb95bb9d.s3tc.ctex"
metadata={ metadata={
"vram_texture": false "imported_formats": ["s3tc_bptc"],
"vram_texture": true
} }
[deps] [deps]
source_file="res://Assets/External/kenney_prototype-textures/texture_08.svg" source_file="res://Assets/External/kenney_prototype-textures/texture_08.svg"
dest_files=["res://.godot/imported/texture_08.svg-da494b7849979c6cd92e284fbb95bb9d.ctex"] dest_files=["res://.godot/imported/texture_08.svg-da494b7849979c6cd92e284fbb95bb9d.s3tc.ctex"]
[params] [params]
compress/mode=0 compress/mode=2
compress/high_quality=false compress/high_quality=false
compress/lossy_quality=0.7 compress/lossy_quality=0.7
compress/uastc_level=0 compress/uastc_level=0
@@ -23,7 +24,7 @@ compress/rdo_quality_loss=0.0
compress/hdr_compression=1 compress/hdr_compression=1
compress/normal_map=0 compress/normal_map=0
compress/channel_pack=0 compress/channel_pack=0
mipmaps/generate=false mipmaps/generate=true
mipmaps/limit=-1 mipmaps/limit=-1
roughness/mode=0 roughness/mode=0
roughness/src_normal="" roughness/src_normal=""
@@ -37,7 +38,7 @@ process/normal_map_invert_y=false
process/hdr_as_srgb=false process/hdr_as_srgb=false
process/hdr_clamp_exposure=false process/hdr_clamp_exposure=false
process/size_limit=0 process/size_limit=0
detect_3d/compress_to=1 detect_3d/compress_to=0
svg/scale=1.0 svg/scale=1.0
editor/scale_with_editor_scale=false editor/scale_with_editor_scale=false
editor/convert_colors_with_editor_theme=false editor/convert_colors_with_editor_theme=false

View File

@@ -3,19 +3,20 @@
importer="texture" importer="texture"
type="CompressedTexture2D" type="CompressedTexture2D"
uid="uid://qlfu7fwg5f2o" uid="uid://qlfu7fwg5f2o"
path="res://.godot/imported/texture_13.svg-4706e0b28991c6beec73dc57cf230b24.ctex" path.s3tc="res://.godot/imported/texture_13.svg-4706e0b28991c6beec73dc57cf230b24.s3tc.ctex"
metadata={ metadata={
"vram_texture": false "imported_formats": ["s3tc_bptc"],
"vram_texture": true
} }
[deps] [deps]
source_file="res://Assets/External/kenney_prototype-textures/texture_13.svg" source_file="res://Assets/External/kenney_prototype-textures/texture_13.svg"
dest_files=["res://.godot/imported/texture_13.svg-4706e0b28991c6beec73dc57cf230b24.ctex"] dest_files=["res://.godot/imported/texture_13.svg-4706e0b28991c6beec73dc57cf230b24.s3tc.ctex"]
[params] [params]
compress/mode=0 compress/mode=2
compress/high_quality=false compress/high_quality=false
compress/lossy_quality=0.7 compress/lossy_quality=0.7
compress/uastc_level=0 compress/uastc_level=0
@@ -23,7 +24,7 @@ compress/rdo_quality_loss=0.0
compress/hdr_compression=1 compress/hdr_compression=1
compress/normal_map=0 compress/normal_map=0
compress/channel_pack=0 compress/channel_pack=0
mipmaps/generate=false mipmaps/generate=true
mipmaps/limit=-1 mipmaps/limit=-1
roughness/mode=0 roughness/mode=0
roughness/src_normal="" roughness/src_normal=""
@@ -37,7 +38,7 @@ process/normal_map_invert_y=false
process/hdr_as_srgb=false process/hdr_as_srgb=false
process/hdr_clamp_exposure=false process/hdr_clamp_exposure=false
process/size_limit=0 process/size_limit=0
detect_3d/compress_to=1 detect_3d/compress_to=0
svg/scale=1.0 svg/scale=1.0
editor/scale_with_editor_scale=false editor/scale_with_editor_scale=false
editor/convert_colors_with_editor_theme=false editor/convert_colors_with_editor_theme=false

BIN
Assets/skybox-panorama.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 32 KiB

View File

@@ -0,0 +1,41 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://fnlm5dao21d8"
path.s3tc="res://.godot/imported/skybox-panorama.png-1018e024adb62a91d26ae7b6f1e9ae52.s3tc.ctex"
metadata={
"imported_formats": ["s3tc_bptc"],
"vram_texture": true
}
[deps]
source_file="res://Assets/skybox-panorama.png"
dest_files=["res://.godot/imported/skybox-panorama.png-1018e024adb62a91d26ae7b6f1e9ae52.s3tc.ctex"]
[params]
compress/mode=2
compress/high_quality=false
compress/lossy_quality=0.7
compress/uastc_level=0
compress/rdo_quality_loss=0.0
compress/hdr_compression=1
compress/normal_map=0
compress/channel_pack=0
mipmaps/generate=true
mipmaps/limit=-1
roughness/mode=0
roughness/src_normal=""
process/channel_remap/red=0
process/channel_remap/green=1
process/channel_remap/blue=2
process/channel_remap/alpha=3
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=0

View File

@@ -21,6 +21,7 @@ var current_movement := MovementMode.Walking
var gravity: float = ProjectSettings.get_setting("physics/3d/default_gravity") var gravity: float = ProjectSettings.get_setting("physics/3d/default_gravity")
var move_speed: float = BASE_MOVE_SPEED var move_speed: float = BASE_MOVE_SPEED
var target_height: float = BASE_HEIGHT var target_height: float = BASE_HEIGHT
var flying := false
@onready var body_collision_shape: CollisionShape3D = $BodyCollisionShape @onready var body_collision_shape: CollisionShape3D = $BodyCollisionShape
@onready var fps_camera: Camera3D = $FPSCamera @onready var fps_camera: Camera3D = $FPSCamera
@@ -47,7 +48,7 @@ func _physics_process(delta: float) -> void:
target_height, CROUCH_TRANSITION_SPEED) target_height, CROUCH_TRANSITION_SPEED)
move_and_slide() move_and_slide()
if is_on_floor() and Input.is_action_just_pressed("jump"): if (is_on_floor() or flying) and Input.is_action_just_pressed("jump"):
velocity.y = JUMP_SPEED velocity.y = JUMP_SPEED
func _input(event: InputEvent) -> void: func _input(event: InputEvent) -> void:
@@ -59,7 +60,11 @@ func _input(event: InputEvent) -> void:
-deg_to_rad(70), deg_to_rad(70)) -deg_to_rad(70), deg_to_rad(70))
func handle_movement(delta: float) -> void: func handle_movement(delta: float) -> void:
velocity.y += -gravity * delta velocity.y += 0.0 if flying else -gravity * delta
if Input.is_action_just_pressed("_cheat_fly"):
flying = not flying
var input = Input.get_vector("strafe_left", "strafe_right", var input = Input.get_vector("strafe_left", "strafe_right",
"move_forward", "move_backward") "move_forward", "move_backward")

View File

@@ -0,0 +1,7 @@
[gd_resource type="StandardMaterial3D" format=3 uid="uid://014h3kro2gsv"]
[ext_resource type="Texture2D" uid="uid://domgof2sjx7qt" path="res://Assets/External/kenney_prototype-textures/texture_08.svg" id="1_0wcts"]
[resource]
albedo_texture = ExtResource("1_0wcts")
uv1_scale = Vector3(8, 8, 8)

View File

@@ -0,0 +1,84 @@
[gd_scene format=3 uid="uid://cy0y28j47h3w"]
[ext_resource type="PackedScene" uid="uid://diipi3w18rk4v" path="res://Player/player_controller.tscn" id="1_fau6w"]
[ext_resource type="Texture2D" uid="uid://fnlm5dao21d8" path="res://Assets/skybox-panorama.png" id="1_gfyfu"]
[ext_resource type="Material" uid="uid://014h3kro2gsv" path="res://Testing/Materials/prototype_floor.tres" id="2_7f328"]
[sub_resource type="PanoramaSkyMaterial" id="PanoramaSkyMaterial_7f328"]
panorama = ExtResource("1_gfyfu")
filter = false
[sub_resource type="Sky" id="Sky_gfyfu"]
sky_material = SubResource("PanoramaSkyMaterial_7f328")
[sub_resource type="Environment" id="Environment_7f328"]
background_mode = 2
sky = SubResource("Sky_gfyfu")
tonemap_mode = 2
ssao_enabled = true
sdfgi_enabled = true
glow_enabled = true
[sub_resource type="StandardMaterial3D" id="StandardMaterial3D_7f328"]
transparency = 1
albedo_color = Color(1, 1, 1, 0.39215687)
roughness = 0.1
refraction_enabled = true
[node name="FloorPrototype" type="Node" unique_id=1720046870]
[node name="Sun" type="DirectionalLight3D" parent="." unique_id=315302175]
transform = Transform3D(-0.8660254, -0.43301278, 0.25, 0, 0.49999997, 0.86602545, -0.50000006, 0.75, -0.43301266, 0, 0, 0)
shadow_enabled = true
[node name="WorldEnvironment" type="WorldEnvironment" parent="." unique_id=2146588525]
environment = SubResource("Environment_7f328")
[node name="WorldGeometry" type="Node" parent="." unique_id=1261921789]
[node name="Floor" type="Node" parent="WorldGeometry" unique_id=693029045]
[node name="Floor" type="CSGBox3D" parent="WorldGeometry/Floor" unique_id=2080275060]
use_collision = true
collision_layer = 2
collision_mask = 3
size = Vector3(100, 0.25, 100)
material = ExtResource("2_7f328")
[node name="TowerGeometry" type="Node" parent="WorldGeometry" unique_id=1363002484]
[node name="WallOne" type="CSGBox3D" parent="WorldGeometry/TowerGeometry" unique_id=175577734]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 30.125, 5.2575006)
use_collision = true
collision_layer = 2
size = Vector3(30, 60, 1)
material = ExtResource("2_7f328")
[node name="WallTwo" type="CSGBox3D" parent="WorldGeometry/TowerGeometry" unique_id=334111110]
transform = Transform3D(-4.371139e-08, 0, 1, 0, 1, 0, -1, 0, -4.371139e-08, 14.443025, 30.125, -10.138264)
use_collision = true
collision_layer = 2
size = Vector3(30, 60, 1)
material = ExtResource("2_7f328")
[node name="WallThree" type="CSGBox3D" parent="WorldGeometry/TowerGeometry" unique_id=343370712]
transform = Transform3D(-1, 0, 8.742278e-08, 0, 1, 0, -8.742278e-08, 0, -1, -0.015110016, 30.125, -24.639809)
use_collision = true
collision_layer = 2
size = Vector3(30, 60, 1)
material = ExtResource("2_7f328")
[node name="WallFour" type="CSGBox3D" parent="WorldGeometry/TowerGeometry" unique_id=5253357]
transform = Transform3D(-4.371139e-08, 0, -1, 0, 1, 0, 1, 0, -4.371139e-08, -14.458136, 30.125, -9.244044)
use_collision = true
collision_layer = 2
size = Vector3(30, 60, 1)
material = ExtResource("2_7f328")
[node name="GlassCeiling" type="CSGBox3D" parent="WorldGeometry/TowerGeometry" unique_id=525059148]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 59.14317, -9.601255)
size = Vector3(28, 1, 30)
material = SubResource("StandardMaterial3D_7f328")
[node name="PlayerController" parent="." unique_id=1462541278 instance=ExtResource("1_fau6w")]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0.125, 0)

View File

@@ -72,6 +72,11 @@ pause={
"events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":4194305,"key_label":0,"unicode":0,"location":0,"echo":false,"script":null) "events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":4194305,"key_label":0,"unicode":0,"location":0,"echo":false,"script":null)
] ]
} }
_cheat_fly={
"deadzone": 0.2,
"events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":96,"key_label":0,"unicode":96,"location":0,"echo":false,"script":null)
]
}
[layer_names] [layer_names]