Just record me going through the house
This commit is contained in:
parent
2de2b7f5ee
commit
700fed5a87
Binary file not shown.
@ -20,6 +20,10 @@ config/icon="res://icon.svg"
|
|||||||
window/size/viewport_width=1920
|
window/size/viewport_width=1920
|
||||||
window/size/viewport_height=1080
|
window/size/viewport_height=1080
|
||||||
|
|
||||||
|
[editor]
|
||||||
|
|
||||||
|
movie_writer/mjpeg_quality=0.9
|
||||||
|
|
||||||
[editor_plugins]
|
[editor_plugins]
|
||||||
|
|
||||||
enabled=PackedStringArray("res://addons/portals/plugin.cfg", "res://addons/proton_scatter/plugin.cfg")
|
enabled=PackedStringArray("res://addons/portals/plugin.cfg", "res://addons/proton_scatter/plugin.cfg")
|
||||||
|
@ -60,7 +60,7 @@ albedo_color = Color(0.448364, 0.428649, 0.0977373, 1)
|
|||||||
[sub_resource type="BoxMesh" id="BoxMesh_kpybi"]
|
[sub_resource type="BoxMesh" id="BoxMesh_kpybi"]
|
||||||
size = Vector3(1000, 0.5, 1000)
|
size = Vector3(1000, 0.5, 1000)
|
||||||
|
|
||||||
[sub_resource type="Resource" id="Resource_nrbqc"]
|
[sub_resource type="Resource" id="Resource_u6m7x"]
|
||||||
script = ExtResource("7_4hat2")
|
script = ExtResource("7_4hat2")
|
||||||
amount = 1500
|
amount = 1500
|
||||||
enabled = true
|
enabled = true
|
||||||
@ -69,7 +69,7 @@ custom_seed = 0
|
|||||||
restrict_height = true
|
restrict_height = true
|
||||||
reference_frame = 1
|
reference_frame = 1
|
||||||
|
|
||||||
[sub_resource type="Resource" id="Resource_1c0ay"]
|
[sub_resource type="Resource" id="Resource_nrbqc"]
|
||||||
script = ExtResource("8_u6m7x")
|
script = ExtResource("8_u6m7x")
|
||||||
position = Vector3(0.15, 0.15, 0.15)
|
position = Vector3(0.15, 0.15, 0.15)
|
||||||
rotation = Vector3(20, 360, 20)
|
rotation = Vector3(20, 360, 20)
|
||||||
@ -80,7 +80,7 @@ custom_seed = 0
|
|||||||
restrict_height = false
|
restrict_height = false
|
||||||
reference_frame = 2
|
reference_frame = 2
|
||||||
|
|
||||||
[sub_resource type="Resource" id="Resource_purgm"]
|
[sub_resource type="Resource" id="Resource_1c0ay"]
|
||||||
script = ExtResource("9_nrbqc")
|
script = ExtResource("9_nrbqc")
|
||||||
iterations = 3
|
iterations = 3
|
||||||
offset_step = 0.2
|
offset_step = 0.2
|
||||||
@ -92,7 +92,7 @@ custom_seed = 0
|
|||||||
restrict_height = true
|
restrict_height = true
|
||||||
reference_frame = 0
|
reference_frame = 0
|
||||||
|
|
||||||
[sub_resource type="Resource" id="Resource_615iq"]
|
[sub_resource type="Resource" id="Resource_purgm"]
|
||||||
script = ExtResource("10_1c0ay")
|
script = ExtResource("10_1c0ay")
|
||||||
ray_direction = Vector3(0, -1, 0)
|
ray_direction = Vector3(0, -1, 0)
|
||||||
ray_length = 5.0
|
ray_length = 5.0
|
||||||
@ -108,9 +108,9 @@ custom_seed = 0
|
|||||||
restrict_height = false
|
restrict_height = false
|
||||||
reference_frame = 0
|
reference_frame = 0
|
||||||
|
|
||||||
[sub_resource type="Resource" id="Resource_31h7w"]
|
[sub_resource type="Resource" id="Resource_615iq"]
|
||||||
script = ExtResource("5_3bxb3")
|
script = ExtResource("5_3bxb3")
|
||||||
stack = Array[ExtResource("6_53v87")]([SubResource("Resource_nrbqc"), SubResource("Resource_1c0ay"), SubResource("Resource_purgm"), SubResource("Resource_615iq")])
|
stack = Array[ExtResource("6_53v87")]([SubResource("Resource_u6m7x"), SubResource("Resource_nrbqc"), SubResource("Resource_1c0ay"), SubResource("Resource_purgm")])
|
||||||
|
|
||||||
[sub_resource type="Resource" id="Resource_37qwj"]
|
[sub_resource type="Resource" id="Resource_37qwj"]
|
||||||
script = ExtResource("13_1c0ay")
|
script = ExtResource("13_1c0ay")
|
||||||
@ -127,7 +127,7 @@ script = ExtResource("12_615iq")
|
|||||||
size = Vector3(15.4096, 1, 9.6442)
|
size = Vector3(15.4096, 1, 9.6442)
|
||||||
metadata/_custom_type_script = "uid://d011g8ga6gea7"
|
metadata/_custom_type_script = "uid://d011g8ga6gea7"
|
||||||
|
|
||||||
[sub_resource type="Resource" id="Resource_ob3ci"]
|
[sub_resource type="Resource" id="Resource_31h7w"]
|
||||||
script = ExtResource("7_4hat2")
|
script = ExtResource("7_4hat2")
|
||||||
amount = 1200
|
amount = 1200
|
||||||
enabled = true
|
enabled = true
|
||||||
@ -136,7 +136,7 @@ custom_seed = 0
|
|||||||
restrict_height = true
|
restrict_height = true
|
||||||
reference_frame = 1
|
reference_frame = 1
|
||||||
|
|
||||||
[sub_resource type="Resource" id="Resource_61s38"]
|
[sub_resource type="Resource" id="Resource_ob3ci"]
|
||||||
script = ExtResource("8_u6m7x")
|
script = ExtResource("8_u6m7x")
|
||||||
position = Vector3(0.1, 0.15, 0.1)
|
position = Vector3(0.1, 0.15, 0.1)
|
||||||
rotation = Vector3(10, 360, 10)
|
rotation = Vector3(10, 360, 10)
|
||||||
@ -147,7 +147,7 @@ custom_seed = 0
|
|||||||
restrict_height = false
|
restrict_height = false
|
||||||
reference_frame = 2
|
reference_frame = 2
|
||||||
|
|
||||||
[sub_resource type="Resource" id="Resource_p6hgd"]
|
[sub_resource type="Resource" id="Resource_61s38"]
|
||||||
script = ExtResource("9_nrbqc")
|
script = ExtResource("9_nrbqc")
|
||||||
iterations = 3
|
iterations = 3
|
||||||
offset_step = 0.2
|
offset_step = 0.2
|
||||||
@ -159,7 +159,7 @@ custom_seed = 0
|
|||||||
restrict_height = true
|
restrict_height = true
|
||||||
reference_frame = 0
|
reference_frame = 0
|
||||||
|
|
||||||
[sub_resource type="Resource" id="Resource_o0mww"]
|
[sub_resource type="Resource" id="Resource_p6hgd"]
|
||||||
script = ExtResource("10_1c0ay")
|
script = ExtResource("10_1c0ay")
|
||||||
ray_direction = Vector3(0, -1, 0)
|
ray_direction = Vector3(0, -1, 0)
|
||||||
ray_length = 5.0
|
ray_length = 5.0
|
||||||
@ -175,9 +175,9 @@ custom_seed = 0
|
|||||||
restrict_height = false
|
restrict_height = false
|
||||||
reference_frame = 0
|
reference_frame = 0
|
||||||
|
|
||||||
[sub_resource type="Resource" id="Resource_ckunl"]
|
[sub_resource type="Resource" id="Resource_o0mww"]
|
||||||
script = ExtResource("5_3bxb3")
|
script = ExtResource("5_3bxb3")
|
||||||
stack = Array[ExtResource("6_53v87")]([SubResource("Resource_ob3ci"), SubResource("Resource_61s38"), SubResource("Resource_p6hgd"), SubResource("Resource_o0mww")])
|
stack = Array[ExtResource("6_53v87")]([SubResource("Resource_31h7w"), SubResource("Resource_ob3ci"), SubResource("Resource_61s38"), SubResource("Resource_p6hgd")])
|
||||||
|
|
||||||
[sub_resource type="Resource" id="Resource_f17e3"]
|
[sub_resource type="Resource" id="Resource_f17e3"]
|
||||||
script = ExtResource("12_615iq")
|
script = ExtResource("12_615iq")
|
||||||
@ -209,7 +209,7 @@ metadata/_edit_lock_ = true
|
|||||||
[node name="ScatterGrass" type="Node3D" parent="Meadow"]
|
[node name="ScatterGrass" type="Node3D" parent="Meadow"]
|
||||||
script = ExtResource("4_u6m7x")
|
script = ExtResource("4_u6m7x")
|
||||||
force_rebuild_on_load = false
|
force_rebuild_on_load = false
|
||||||
modifier_stack = SubResource("Resource_31h7w")
|
modifier_stack = SubResource("Resource_615iq")
|
||||||
Performance/use_chunks = true
|
Performance/use_chunks = true
|
||||||
Performance/chunk_dimensions = Vector3(15, 15, 15)
|
Performance/chunk_dimensions = Vector3(15, 15, 15)
|
||||||
metadata/_custom_type_script = "uid://mlpya7qid02x"
|
metadata/_custom_type_script = "uid://mlpya7qid02x"
|
||||||
@ -252,7 +252,7 @@ metadata/_custom_type_script = "uid://bsl3en0gdt8ka"
|
|||||||
[node name="ScatterTrees" type="Node3D" parent="Meadow"]
|
[node name="ScatterTrees" type="Node3D" parent="Meadow"]
|
||||||
script = ExtResource("4_u6m7x")
|
script = ExtResource("4_u6m7x")
|
||||||
force_rebuild_on_load = false
|
force_rebuild_on_load = false
|
||||||
modifier_stack = SubResource("Resource_ckunl")
|
modifier_stack = SubResource("Resource_o0mww")
|
||||||
Performance/use_chunks = true
|
Performance/use_chunks = true
|
||||||
Performance/chunk_dimensions = Vector3(15, 15, 15)
|
Performance/chunk_dimensions = Vector3(15, 15, 15)
|
||||||
metadata/_custom_type_script = "uid://mlpya7qid02x"
|
metadata/_custom_type_script = "uid://mlpya7qid02x"
|
||||||
|
@ -84,7 +84,7 @@ radius = 0.2
|
|||||||
height = 1.75
|
height = 1.75
|
||||||
|
|
||||||
[node name="World" type="Node3D"]
|
[node name="World" type="Node3D"]
|
||||||
metadata/movie_file = "captures/b_.png"
|
metadata/movie_file = "captures/e_.avi"
|
||||||
|
|
||||||
[node name="WorldEnvironment" type="WorldEnvironment" parent="."]
|
[node name="WorldEnvironment" type="WorldEnvironment" parent="."]
|
||||||
environment = SubResource("Environment_o8fc1")
|
environment = SubResource("Environment_o8fc1")
|
||||||
@ -232,7 +232,7 @@ _teleport_area_path = NodePath("TeleportArea")
|
|||||||
_teleport_collider_path = NodePath("TeleportArea/Collider")
|
_teleport_collider_path = NodePath("TeleportArea/Collider")
|
||||||
portal_size = Vector2(1.5, 2.5)
|
portal_size = Vector2(1.5, 2.5)
|
||||||
exit_portal = NodePath("../PortalSmall")
|
exit_portal = NodePath("../PortalSmall")
|
||||||
portal_frame_width = 0.0
|
portal_frame_width = 1.0
|
||||||
viewport_size_mode = 0
|
viewport_size_mode = 0
|
||||||
view_direction = 1
|
view_direction = 1
|
||||||
portal_render_layer = 524288
|
portal_render_layer = 524288
|
||||||
@ -264,7 +264,7 @@ shape = SubResource("BoxShape3D_7t5mc")
|
|||||||
shape = SubResource("WorldBoundaryShape3D_dss4m")
|
shape = SubResource("WorldBoundaryShape3D_dss4m")
|
||||||
|
|
||||||
[node name="CharacterBody3D" type="CharacterBody3D" parent="." node_paths=PackedStringArray("camera")]
|
[node name="CharacterBody3D" type="CharacterBody3D" parent="." node_paths=PackedStringArray("camera")]
|
||||||
transform = Transform3D(0.258819, 0, 0.965926, 0, 1, 0, -0.965926, 0, 0.258819, 12.9999, 1.36224, -1.22552)
|
transform = Transform3D(-0.524357, 0, 0.851498, 0, 1, 0, -0.851498, 0, -0.524357, 10.6968, 1.36224, -8.3989)
|
||||||
collision_layer = 3
|
collision_layer = 3
|
||||||
script = ExtResource("17_7t5mc")
|
script = ExtResource("17_7t5mc")
|
||||||
camera = NodePath("Camera3D")
|
camera = NodePath("Camera3D")
|
||||||
|
@ -31,36 +31,50 @@ func _process(delta: float) -> void:
|
|||||||
camera.rotation.x = lerp_angle(camera.rotation.x, target_rotation.x, delta * ROTATION_SPEED)
|
camera.rotation.x = lerp_angle(camera.rotation.x, target_rotation.x, delta * ROTATION_SPEED)
|
||||||
|
|
||||||
|
|
||||||
func _physics_process(delta: float) -> void:
|
const ACCELERATION := 10.0
|
||||||
var right: Vector3 = (global_transform.basis.x * Vector3(1, 0, 1)).normalized()
|
const DECELERATION := 6.0
|
||||||
var forward: Vector3 = (-global_transform.basis.z * Vector3(1, 0, 1)).normalized()
|
|
||||||
var has_input = false
|
|
||||||
|
|
||||||
velocity.x = 0
|
|
||||||
velocity.z = 0
|
|
||||||
|
|
||||||
|
var input_direction := Vector3.ZERO
|
||||||
|
var target_velocity := Vector3.ZERO
|
||||||
|
|
||||||
|
func _get_input_direction() -> Vector3:
|
||||||
|
var direction := Vector3.ZERO
|
||||||
if Input.is_key_pressed(KEY_LEFT) or Input.is_key_pressed(KEY_A):
|
if Input.is_key_pressed(KEY_LEFT) or Input.is_key_pressed(KEY_A):
|
||||||
has_input = true
|
direction.x -= 1
|
||||||
velocity -= right
|
|
||||||
if Input.is_key_pressed(KEY_RIGHT) or Input.is_key_pressed(KEY_D):
|
if Input.is_key_pressed(KEY_RIGHT) or Input.is_key_pressed(KEY_D):
|
||||||
has_input = true
|
direction.x += 1
|
||||||
velocity += right
|
|
||||||
if Input.is_key_pressed(KEY_UP) or Input.is_key_pressed(KEY_W):
|
if Input.is_key_pressed(KEY_UP) or Input.is_key_pressed(KEY_W):
|
||||||
has_input = true
|
direction.z += 1
|
||||||
velocity += forward
|
|
||||||
if Input.is_key_pressed(KEY_DOWN) or Input.is_key_pressed(KEY_S):
|
if Input.is_key_pressed(KEY_DOWN) or Input.is_key_pressed(KEY_S):
|
||||||
has_input = true
|
direction.z -= 1
|
||||||
velocity -= forward
|
return direction.normalized()
|
||||||
|
|
||||||
if has_input:
|
func _physics_process(delta: float) -> void:
|
||||||
var normalized_horizontal_velocity = Vector2(velocity.x, velocity.z).normalized()
|
# Get input direction relative to player orientation
|
||||||
velocity.x = normalized_horizontal_velocity.x * SPEED
|
input_direction = _get_input_direction()
|
||||||
velocity.z = normalized_horizontal_velocity.y * SPEED
|
|
||||||
|
|
||||||
|
var basis := global_transform.basis
|
||||||
|
var forward := -basis.z.normalized()
|
||||||
|
var right := basis.x.normalized()
|
||||||
|
|
||||||
|
# Desired horizontal movement direction in world space
|
||||||
|
var desired_velocity : Vector3 = (right * input_direction.x + forward * input_direction.z) * SPEED
|
||||||
|
desired_velocity.y = 0 # Only horizontal
|
||||||
|
|
||||||
|
# Smooth acceleration/deceleration
|
||||||
|
var accel := DECELERATION if input_direction == Vector3.ZERO else ACCELERATION
|
||||||
|
target_velocity.x = lerp(target_velocity.x, desired_velocity.x, accel * delta)
|
||||||
|
target_velocity.z = lerp(target_velocity.z, desired_velocity.z, accel * delta)
|
||||||
|
|
||||||
|
# Preserve existing vertical velocity
|
||||||
if not is_on_floor():
|
if not is_on_floor():
|
||||||
velocity += get_gravity() * delta
|
target_velocity.y += get_gravity().y * delta
|
||||||
|
else:
|
||||||
if Input.is_action_just_pressed("ui_accept") and is_on_floor():
|
target_velocity.y = 0
|
||||||
velocity.y = JUMP_VELOCITY
|
if Input.is_action_just_pressed("ui_accept"):
|
||||||
|
target_velocity.y = JUMP_VELOCITY
|
||||||
|
|
||||||
|
# Apply movement
|
||||||
|
velocity = target_velocity
|
||||||
move_and_slide()
|
move_and_slide()
|
||||||
|
Loading…
Reference in New Issue
Block a user