game: add shooting
This commit is contained in:
@@ -3,13 +3,20 @@ extends CharacterBody3D
|
||||
const SPEED = 5.0
|
||||
const JUMP_VELOCITY = 4.5
|
||||
const SENSITIVITY = 0.005
|
||||
const FOV_DEFAULT: float = 75.0
|
||||
const FOV_SPRINT: float = 90.0
|
||||
const FOV_LERP = 0.2
|
||||
|
||||
var gravity = ProjectSettings.get_setting("physics/3d/default_gravity")
|
||||
|
||||
@onready var head = $Head
|
||||
@onready var camera = $Head/Camera3D
|
||||
@onready var dash_timer = $DashTimer
|
||||
@onready var player_debug = $Head/Camera3D/PlayerDebug
|
||||
@onready var camera = $Head/PlayerCamera
|
||||
@onready var player_debug = $Head/PlayerCamera/PlayerDebug
|
||||
@onready var player_stats = $PlayerStats
|
||||
@onready var anim_player = $AnimationPlayer
|
||||
@onready var muzzle_flash = $Head/PlayerCamera/pistol/MuzzleFlash
|
||||
@onready var pistol_raycast = $Head/PlayerCamera/pistol/RayCast3D
|
||||
@onready var bullet_decal = preload("res://bullet_decal.tscn")
|
||||
|
||||
func _ready() -> void:
|
||||
Input.set_mouse_mode(Input.MOUSE_MODE_CAPTURED)
|
||||
@@ -20,11 +27,18 @@ func _unhandled_input(event: InputEvent) -> void:
|
||||
camera.rotate_x(-event.relative.y * SENSITIVITY)
|
||||
camera.rotation.x = clamp(camera.rotation.x, deg_to_rad(-40), deg_to_rad(80))
|
||||
|
||||
if Input.is_action_just_pressed("shoot") and anim_player.current_animation != "shoot":
|
||||
play_shoot_effect()
|
||||
|
||||
|
||||
if Input.is_action_just_pressed("ui_cancel"):
|
||||
if Input.mouse_mode == Input.MOUSE_MODE_VISIBLE:
|
||||
get_tree().quit(0)
|
||||
Input.set_mouse_mode(Input.MOUSE_MODE_VISIBLE)
|
||||
|
||||
if Input.is_action_just_pressed("debug_overlay"):
|
||||
player_debug.visible = !player_debug.visible
|
||||
|
||||
|
||||
func _physics_process(delta: float) -> void:
|
||||
if not is_on_floor():
|
||||
@@ -37,21 +51,45 @@ func _physics_process(delta: float) -> void:
|
||||
var direction = (head.transform.basis * Vector3(input_dir.x, 0, input_dir.y)).normalized()
|
||||
|
||||
if direction:
|
||||
velocity.x = direction.x * SPEED
|
||||
velocity.z = direction.z * SPEED
|
||||
velocity.x = direction.x * player_stats.speed
|
||||
velocity.z = direction.z * player_stats.speed
|
||||
else:
|
||||
velocity.x = 0.0
|
||||
velocity.z = 0.0
|
||||
|
||||
if Input.is_action_just_pressed("dash") and dash_timer.is_stopped():
|
||||
velocity.x = velocity.x * 10
|
||||
velocity.z = velocity.z * 10
|
||||
dash_timer.start()
|
||||
if Input.is_action_pressed("sprint"):
|
||||
velocity.x = velocity.x * player_stats.sprint_multiplier
|
||||
velocity.z = velocity.z * player_stats.sprint_multiplier
|
||||
camera.fov = lerp(camera.fov, FOV_SPRINT, FOV_LERP)
|
||||
else:
|
||||
camera.fov = lerp(camera.fov, FOV_DEFAULT, FOV_LERP)
|
||||
|
||||
# Animations
|
||||
if input_dir != Vector2.ZERO and is_on_floor() and anim_player.current_animation != "shoot":
|
||||
anim_player.play("move")
|
||||
else:
|
||||
anim_player.play("idle")
|
||||
|
||||
|
||||
if player_debug.visible:
|
||||
player_debug.add_stat("vel_x", str(velocity.x))
|
||||
player_debug.add_stat("vel_y", str(velocity.y))
|
||||
player_debug.add_stat("vel_z", str(velocity.z))
|
||||
player_debug.add_stat("dash_cd", str(dash_timer.time_left))
|
||||
player_debug.add_stat("vel_tot", str(absf(velocity.z) + absf(velocity.x) + absf(velocity.y)))
|
||||
player_debug.add_stat("hp", str(player_stats.current_health))
|
||||
|
||||
move_and_slide()
|
||||
|
||||
func play_shoot_effect():
|
||||
anim_player.stop()
|
||||
anim_player.play("shoot")
|
||||
muzzle_flash.restart()
|
||||
muzzle_flash.emitting = true
|
||||
|
||||
var collider = pistol_raycast.get_collider()
|
||||
var col_point = pistol_raycast.get_collision_point()
|
||||
if col_point and collider:
|
||||
var b = bullet_decal.instantiate()
|
||||
pistol_raycast.get_collider().add_child(b)
|
||||
b.global_transform.origin = col_point
|
||||
b.look_at(col_point + pistol_raycast.get_collision_normal(), Vector3.UP)
|
||||
|
BIN
game/assets/textures/star_01.png
(Stored with Git LFS)
Normal file
BIN
game/assets/textures/star_01.png
(Stored with Git LFS)
Normal file
Binary file not shown.
35
game/assets/textures/star_01.png.import
Normal file
35
game/assets/textures/star_01.png.import
Normal file
@@ -0,0 +1,35 @@
|
||||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="CompressedTexture2D"
|
||||
uid="uid://cmldtn5n8a7vr"
|
||||
path.s3tc="res://.godot/imported/star_01.png-1bc02096a1a9644baf9648c6f7865a37.s3tc.ctex"
|
||||
metadata={
|
||||
"imported_formats": ["s3tc_bptc"],
|
||||
"vram_texture": true
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://assets/textures/star_01.png"
|
||||
dest_files=["res://.godot/imported/star_01.png-1bc02096a1a9644baf9648c6f7865a37.s3tc.ctex"]
|
||||
|
||||
[params]
|
||||
|
||||
compress/mode=2
|
||||
compress/high_quality=false
|
||||
compress/lossy_quality=0.7
|
||||
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/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
|
4
game/box.tres
Normal file
4
game/box.tres
Normal file
@@ -0,0 +1,4 @@
|
||||
[gd_resource type="StandardMaterial3D" format=3 uid="uid://b22qolgtk5f6c"]
|
||||
|
||||
[resource]
|
||||
albedo_color = Color(1, 0.396078, 1, 1)
|
15
game/bullet_decal.tscn
Normal file
15
game/bullet_decal.tscn
Normal file
@@ -0,0 +1,15 @@
|
||||
[gd_scene load_steps=3 format=3 uid="uid://5dqpmmbur7v6"]
|
||||
|
||||
[sub_resource type="PlaneMesh" id="PlaneMesh_q27hx"]
|
||||
size = Vector2(0.05, 0.05)
|
||||
orientation = 2
|
||||
|
||||
[sub_resource type="StandardMaterial3D" id="StandardMaterial3D_mfh3f"]
|
||||
albedo_color = Color(0, 0, 0, 1)
|
||||
|
||||
[node name="BulletDecal" type="Node3D"]
|
||||
|
||||
[node name="MeshInstance3D" type="MeshInstance3D" parent="."]
|
||||
transform = Transform3D(1, 0, 0, 0, -1, -8.74228e-08, 0, 8.74228e-08, -1, 0, 0, -0.00702295)
|
||||
mesh = SubResource("PlaneMesh_q27hx")
|
||||
surface_material_override/0 = SubResource("StandardMaterial3D_mfh3f")
|
BIN
game/models/pistol.glb
(Stored with Git LFS)
Normal file
BIN
game/models/pistol.glb
(Stored with Git LFS)
Normal file
Binary file not shown.
37
game/models/pistol.glb.import
Normal file
37
game/models/pistol.glb.import
Normal file
@@ -0,0 +1,37 @@
|
||||
[remap]
|
||||
|
||||
importer="scene"
|
||||
importer_version=1
|
||||
type="PackedScene"
|
||||
uid="uid://ditco83gy03gm"
|
||||
path="res://.godot/imported/pistol.glb-fc3cb9deb081cfd06a6c46c3c528ce09.scn"
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://models/pistol.glb"
|
||||
dest_files=["res://.godot/imported/pistol.glb-fc3cb9deb081cfd06a6c46c3c528ce09.scn"]
|
||||
|
||||
[params]
|
||||
|
||||
nodes/root_type=""
|
||||
nodes/root_name=""
|
||||
nodes/apply_root_scale=true
|
||||
nodes/root_scale=1.0
|
||||
nodes/import_as_skeleton_bones=false
|
||||
nodes/use_node_type_suffixes=true
|
||||
meshes/ensure_tangents=true
|
||||
meshes/generate_lods=true
|
||||
meshes/create_shadow_meshes=true
|
||||
meshes/light_baking=1
|
||||
meshes/lightmap_texel_size=0.2
|
||||
meshes/force_disable_compression=false
|
||||
skins/use_named_skins=true
|
||||
animation/import=true
|
||||
animation/fps=30
|
||||
animation/trimming=false
|
||||
animation/remove_immutable_tracks=true
|
||||
animation/import_rest_as_RESET=false
|
||||
import_script/path=""
|
||||
_subresources={}
|
||||
gltf/naming_version=1
|
||||
gltf/embedded_image_handling=1
|
185
game/player.tscn
185
game/player.tscn
@@ -1,7 +1,10 @@
|
||||
[gd_scene load_steps=6 format=3 uid="uid://dkldpdufpl28x"]
|
||||
[gd_scene load_steps=19 format=3 uid="uid://dkldpdufpl28x"]
|
||||
|
||||
[ext_resource type="Script" uid="uid://5vty5riyfef2" path="res://Player.gd" id="1_4flbx"]
|
||||
[ext_resource type="Script" uid="uid://cad5seggccvp6" path="res://player_debug.gd" id="2_onrkg"]
|
||||
[ext_resource type="PackedScene" uid="uid://ditco83gy03gm" path="res://models/pistol.glb" id="3_hqtel"]
|
||||
[ext_resource type="Script" uid="uid://7ads6wescib" path="res://player_stats.gd" id="3_i3pqv"]
|
||||
[ext_resource type="Texture2D" uid="uid://cmldtn5n8a7vr" path="res://assets/textures/star_01.png" id="4_sweqy"]
|
||||
|
||||
[sub_resource type="CapsuleMesh" id="CapsuleMesh_fj7yv"]
|
||||
|
||||
@@ -10,8 +13,159 @@ points = PackedVector3Array(-0.125207, -0.532801, -0.480507, 0.0227831, 0.47607,
|
||||
|
||||
[sub_resource type="BoxMesh" id="BoxMesh_4flbx"]
|
||||
|
||||
[sub_resource type="Gradient" id="Gradient_2hs0m"]
|
||||
offsets = PackedFloat32Array(0, 0.0695876, 1)
|
||||
colors = PackedColorArray(0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 0)
|
||||
|
||||
[sub_resource type="GradientTexture1D" id="GradientTexture1D_1jxqw"]
|
||||
gradient = SubResource("Gradient_2hs0m")
|
||||
|
||||
[sub_resource type="ParticleProcessMaterial" id="ParticleProcessMaterial_dw050"]
|
||||
angle_min = 45.0
|
||||
angle_max = 45.0
|
||||
gravity = Vector3(0, 0, 0)
|
||||
color_ramp = SubResource("GradientTexture1D_1jxqw")
|
||||
|
||||
[sub_resource type="StandardMaterial3D" id="StandardMaterial3D_b26j0"]
|
||||
transparency = 1
|
||||
shading_mode = 0
|
||||
vertex_color_use_as_albedo = true
|
||||
albedo_color = Color(1, 0.87451, 0.635294, 1)
|
||||
albedo_texture = ExtResource("4_sweqy")
|
||||
billboard_mode = 3
|
||||
particles_anim_h_frames = 1
|
||||
particles_anim_v_frames = 1
|
||||
particles_anim_loop = false
|
||||
|
||||
[sub_resource type="PlaneMesh" id="PlaneMesh_n7ghd"]
|
||||
material = SubResource("StandardMaterial3D_b26j0")
|
||||
size = Vector2(0.4, 0.4)
|
||||
orientation = 2
|
||||
|
||||
[sub_resource type="Animation" id="Animation_hqtel"]
|
||||
resource_name = "idle"
|
||||
length = 3.0
|
||||
loop_mode = 1
|
||||
step = 0.5
|
||||
tracks/0/type = "value"
|
||||
tracks/0/imported = false
|
||||
tracks/0/enabled = true
|
||||
tracks/0/path = NodePath("Head/PlayerCamera/pistol:position")
|
||||
tracks/0/interp = 1
|
||||
tracks/0/loop_wrap = true
|
||||
tracks/0/keys = {
|
||||
"times": PackedFloat32Array(0, 1.5),
|
||||
"transitions": PackedFloat32Array(-2, -2),
|
||||
"update": 0,
|
||||
"values": [Vector3(0.492394, -0.353437, -0.607601), Vector3(0.492394, -0.374851, -0.607601)]
|
||||
}
|
||||
tracks/1/type = "value"
|
||||
tracks/1/imported = false
|
||||
tracks/1/enabled = true
|
||||
tracks/1/path = NodePath("Head/PlayerCamera/pistol:rotation")
|
||||
tracks/1/interp = 1
|
||||
tracks/1/loop_wrap = true
|
||||
tracks/1/keys = {
|
||||
"times": PackedFloat32Array(0, 1.5),
|
||||
"transitions": PackedFloat32Array(-2, -2),
|
||||
"update": 0,
|
||||
"values": [Vector3(0, 0.0417832, 0), Vector3(-0.133121, 0.0421564, -0.00559862)]
|
||||
}
|
||||
|
||||
[sub_resource type="Animation" id="Animation_sweqy"]
|
||||
length = 0.001
|
||||
tracks/0/type = "value"
|
||||
tracks/0/imported = false
|
||||
tracks/0/enabled = true
|
||||
tracks/0/path = NodePath("Head/PlayerCamera/pistol:position")
|
||||
tracks/0/interp = 1
|
||||
tracks/0/loop_wrap = true
|
||||
tracks/0/keys = {
|
||||
"times": PackedFloat32Array(0),
|
||||
"transitions": PackedFloat32Array(1),
|
||||
"update": 0,
|
||||
"values": [Vector3(0.492394, -0.353437, -0.607601)]
|
||||
}
|
||||
tracks/1/type = "value"
|
||||
tracks/1/imported = false
|
||||
tracks/1/enabled = true
|
||||
tracks/1/path = NodePath("Head/PlayerCamera/pistol:rotation")
|
||||
tracks/1/interp = 1
|
||||
tracks/1/loop_wrap = true
|
||||
tracks/1/keys = {
|
||||
"times": PackedFloat32Array(0),
|
||||
"transitions": PackedFloat32Array(1),
|
||||
"update": 0,
|
||||
"values": [Vector3(0, 0.0417832, 0)]
|
||||
}
|
||||
|
||||
[sub_resource type="Animation" id="Animation_2hs0m"]
|
||||
resource_name = "move"
|
||||
loop_mode = 1
|
||||
step = 0.25
|
||||
tracks/0/type = "value"
|
||||
tracks/0/imported = false
|
||||
tracks/0/enabled = true
|
||||
tracks/0/path = NodePath("Head/PlayerCamera/pistol:position")
|
||||
tracks/0/interp = 1
|
||||
tracks/0/loop_wrap = true
|
||||
tracks/0/keys = {
|
||||
"times": PackedFloat32Array(0, 0.25, 0.5, 0.75),
|
||||
"transitions": PackedFloat32Array(1, 1, 1, 1),
|
||||
"update": 0,
|
||||
"values": [Vector3(0.492394, -0.353437, -0.607601), Vector3(0.455433, -0.331914, -0.607601), Vector3(0.492394, -0.353437, -0.607601), Vector3(0.523617, -0.353437, -0.607601)]
|
||||
}
|
||||
tracks/1/type = "value"
|
||||
tracks/1/imported = false
|
||||
tracks/1/enabled = true
|
||||
tracks/1/path = NodePath("Head/PlayerCamera/pistol:rotation")
|
||||
tracks/1/interp = 1
|
||||
tracks/1/loop_wrap = true
|
||||
tracks/1/keys = {
|
||||
"times": PackedFloat32Array(0, 0.25, 0.5, 0.75),
|
||||
"transitions": PackedFloat32Array(1, 1, 1, 1),
|
||||
"update": 0,
|
||||
"values": [Vector3(0, 0.0417832, 0), Vector3(0.0412236, 0.0418187, 0.00172443), Vector3(0, 0.0417832, 0), Vector3(-0.0368292, 0.0418116, -0.00154043)]
|
||||
}
|
||||
|
||||
[sub_resource type="Animation" id="Animation_1jxqw"]
|
||||
resource_name = "shoot"
|
||||
length = 0.4
|
||||
step = 0.2
|
||||
tracks/0/type = "value"
|
||||
tracks/0/imported = false
|
||||
tracks/0/enabled = true
|
||||
tracks/0/path = NodePath("Head/PlayerCamera/pistol:position")
|
||||
tracks/0/interp = 1
|
||||
tracks/0/loop_wrap = true
|
||||
tracks/0/keys = {
|
||||
"times": PackedFloat32Array(0, 0.4),
|
||||
"transitions": PackedFloat32Array(0.5, 1),
|
||||
"update": 0,
|
||||
"values": [Vector3(0.492394, -0.353437, -0.607601), Vector3(0.492394, -0.353437, -0.607601)]
|
||||
}
|
||||
tracks/1/type = "value"
|
||||
tracks/1/imported = false
|
||||
tracks/1/enabled = true
|
||||
tracks/1/path = NodePath("Head/PlayerCamera/pistol:rotation")
|
||||
tracks/1/interp = 1
|
||||
tracks/1/loop_wrap = true
|
||||
tracks/1/keys = {
|
||||
"times": PackedFloat32Array(0, 0.4),
|
||||
"transitions": PackedFloat32Array(0.5, 1),
|
||||
"update": 0,
|
||||
"values": [Vector3(0.404943, 0.0454622, 0.017921), Vector3(0, 0.0417832, 0)]
|
||||
}
|
||||
|
||||
[sub_resource type="AnimationLibrary" id="AnimationLibrary_1jxqw"]
|
||||
_data = {
|
||||
&"RESET": SubResource("Animation_sweqy"),
|
||||
&"idle": SubResource("Animation_hqtel"),
|
||||
&"move": SubResource("Animation_2hs0m"),
|
||||
&"shoot": SubResource("Animation_1jxqw")
|
||||
}
|
||||
|
||||
[node name="Player" type="CharacterBody3D"]
|
||||
visible = false
|
||||
script = ExtResource("1_4flbx")
|
||||
|
||||
[node name="MeshInstance3D" type="MeshInstance3D" parent="."]
|
||||
@@ -33,12 +187,35 @@ skeleton = NodePath("../..")
|
||||
[node name="PlayerCamera" type="Camera3D" parent="Head"]
|
||||
|
||||
[node name="PlayerDebug" type="CanvasLayer" parent="Head/PlayerCamera"]
|
||||
visible = false
|
||||
script = ExtResource("2_onrkg")
|
||||
|
||||
[node name="PlayerDebugText" type="RichTextLabel" parent="Head/PlayerCamera/PlayerDebug"]
|
||||
offset_right = 635.0
|
||||
offset_bottom = 283.0
|
||||
text = "example_stat: 10.0"
|
||||
|
||||
[node name="DashTimer" type="Timer" parent="."]
|
||||
[node name="pistol" parent="Head/PlayerCamera" instance=ExtResource("3_hqtel")]
|
||||
transform = Transform3D(0.999127, 0, 0.041771, 0, 1, 0, -0.041771, 0, 0.999127, 0.492394, -0.353437, -0.607601)
|
||||
|
||||
[node name="MuzzleFlash" type="GPUParticles3D" parent="Head/PlayerCamera/pistol"]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 3.57628e-06, 0.0631319, -0.278016)
|
||||
emitting = false
|
||||
lifetime = 0.15
|
||||
one_shot = true
|
||||
local_coords = true
|
||||
process_material = SubResource("ParticleProcessMaterial_dw050")
|
||||
draw_pass_1 = SubResource("PlaneMesh_n7ghd")
|
||||
|
||||
[node name="RayCast3D" type="RayCast3D" parent="Head/PlayerCamera/pistol"]
|
||||
transform = Transform3D(0.998255, -0.041771, 0.0417346, 0.041771, -4.37114e-08, -0.999127, 0.0417346, 0.999127, 0.00174477, 0.000758827, 0.0641694, -0.246936)
|
||||
target_position = Vector3(0, -50, 0)
|
||||
|
||||
[node name="PlayerStats" type="Node" parent="."]
|
||||
script = ExtResource("3_i3pqv")
|
||||
|
||||
[node name="AnimationPlayer" type="AnimationPlayer" parent="."]
|
||||
libraries = {
|
||||
&"": SubResource("AnimationLibrary_1jxqw")
|
||||
}
|
||||
autoplay = "move"
|
||||
playback_default_blend_time = 0.05
|
||||
|
@@ -4,8 +4,8 @@ extends CanvasLayer
|
||||
|
||||
var stats: Dictionary = {}
|
||||
|
||||
func add_stat(name: String, value: String):
|
||||
stats[name] = value
|
||||
func add_stat(key: String, value: String):
|
||||
stats[key] = value
|
||||
|
||||
func _process(delta: float) -> void:
|
||||
debug_text.clear()
|
||||
|
17
game/player_stats.gd
Normal file
17
game/player_stats.gd
Normal file
@@ -0,0 +1,17 @@
|
||||
extends Node
|
||||
|
||||
const BASE_SPEED: float = 5.0
|
||||
const BASE_MAX_HEALTH: float = 100.0
|
||||
const BASE_SPRINT_MULTIPLIER: float = 1.5
|
||||
|
||||
var current_health: float
|
||||
var speed: float
|
||||
var sprint_multiplier: float
|
||||
|
||||
func _ready() -> void:
|
||||
current_health = BASE_MAX_HEALTH
|
||||
speed = BASE_SPEED
|
||||
sprint_multiplier = BASE_SPRINT_MULTIPLIER
|
||||
|
||||
func add_health(val: float):
|
||||
current_health += val
|
@@ -42,7 +42,7 @@ jump={
|
||||
"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":32,"key_label":0,"unicode":32,"location":0,"echo":false,"script":null)
|
||||
]
|
||||
}
|
||||
dash={
|
||||
sprint={
|
||||
"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":4194325,"key_label":0,"unicode":0,"location":0,"echo":false,"script":null)
|
||||
]
|
||||
@@ -52,3 +52,8 @@ debug_overlay={
|
||||
"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":4194332,"key_label":0,"unicode":0,"location":0,"echo":false,"script":null)
|
||||
]
|
||||
}
|
||||
shoot={
|
||||
"deadzone": 0.2,
|
||||
"events": [Object(InputEventMouseButton,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"button_mask":1,"position":Vector2(204, 17),"global_position":Vector2(213, 65),"factor":1.0,"button_index":1,"canceled":false,"pressed":true,"double_click":false,"script":null)
|
||||
]
|
||||
}
|
||||
|
@@ -1,6 +1,7 @@
|
||||
[gd_scene load_steps=6 format=3 uid="uid://co2f5i23gyp03"]
|
||||
[gd_scene load_steps=8 format=3 uid="uid://co2f5i23gyp03"]
|
||||
|
||||
[ext_resource type="PackedScene" uid="uid://dkldpdufpl28x" path="res://player.tscn" id="1_f3sb7"]
|
||||
[ext_resource type="Material" uid="uid://b22qolgtk5f6c" path="res://box.tres" id="1_fj7yv"]
|
||||
|
||||
[sub_resource type="ProceduralSkyMaterial" id="ProceduralSkyMaterial_f3sb7"]
|
||||
sky_horizon_color = Color(0.662243, 0.671743, 0.686743, 1)
|
||||
@@ -18,6 +19,9 @@ glow_enabled = true
|
||||
[sub_resource type="StandardMaterial3D" id="StandardMaterial3D_f3sb7"]
|
||||
albedo_color = Color(0.398875, 0.46629, 0.228578, 1)
|
||||
|
||||
[sub_resource type="StandardMaterial3D" id="StandardMaterial3D_tlwt5"]
|
||||
albedo_color = Color(1.01075e-06, 0.511717, 0.523072, 1)
|
||||
|
||||
[node name="World" type="Node3D"]
|
||||
|
||||
[node name="DirectionalLight3D" type="DirectionalLight3D" parent="."]
|
||||
@@ -36,26 +40,32 @@ material = SubResource("StandardMaterial3D_f3sb7")
|
||||
[node name="Wall1" type="CSGBox3D" parent="Ground"]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, -4.61707, -49.5431)
|
||||
size = Vector3(100, 10, 1)
|
||||
material = SubResource("StandardMaterial3D_tlwt5")
|
||||
|
||||
[node name="Wall2" type="CSGBox3D" parent="Ground"]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, -4.61706, 49.9496)
|
||||
size = Vector3(100, 10, 1)
|
||||
material = SubResource("StandardMaterial3D_tlwt5")
|
||||
|
||||
[node name="Wall3" type="CSGBox3D" parent="Ground"]
|
||||
transform = Transform3D(-4.37114e-08, 0, 1, 0, 1, 0, -1, 0, -4.37114e-08, 49.4113, -4.61706, 0.548481)
|
||||
size = Vector3(100, 10, 1)
|
||||
material = SubResource("StandardMaterial3D_tlwt5")
|
||||
|
||||
[node name="Wall4" type="CSGBox3D" parent="Ground"]
|
||||
transform = Transform3D(-4.37114e-08, 0, 1, 0, 1, 0, -1, 0, -4.37114e-08, -48.8424, -4.61706, 0.548481)
|
||||
size = Vector3(100, 10, 1)
|
||||
material = SubResource("StandardMaterial3D_tlwt5")
|
||||
|
||||
[node name="CSGBox3D" type="CSGBox3D" parent="Ground"]
|
||||
transform = Transform3D(1, 0, 0, 0, -1, -8.74228e-08, 0, 8.74228e-08, -1, 0, -0.970131, 27.9382)
|
||||
size = Vector3(5, 1, 5)
|
||||
material = ExtResource("1_fj7yv")
|
||||
|
||||
[node name="CSGBox3D2" type="CSGBox3D" parent="Ground"]
|
||||
transform = Transform3D(1, 0, 0, 0, -1, -8.74228e-08, 0, 8.74228e-08, -1, 10.554, -2.97013, 27.9382)
|
||||
size = Vector3(5, 5, 5)
|
||||
material = ExtResource("1_fj7yv")
|
||||
|
||||
[node name="Player" parent="." instance=ExtResource("1_f3sb7")]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0.55964, 0)
|
||||
|
Reference in New Issue
Block a user