OverviewFilesCommitsIssuesDocsReleasesPeers

hyper-tps / scenes / player / player_procedural.tscn

129 lines · tscn ref:
[gd_scene format=3 uid="uid://duxajohhwdw7v"]

[ext_resource type="Script" uid="uid://bywy70rnemuvf" path="res://scenes/player/player_input.gd" id="input_script"]
[ext_resource type="Script" uid="uid://c3mjsoblveiwp" path="res://scenes/player/player_procedural.gd" id="main_script"]
[ext_resource type="AudioStream" uid="uid://d5g4tpemyqp8" path="res://assets/sounds/player/metal_footstep_1.wav" id="snd_foot1"]
[ext_resource type="AudioStream" uid="uid://cnqui1vo7dobs" path="res://assets/sounds/player/metal_footstep_2.wav" id="snd_foot2"]
[ext_resource type="AudioStream" uid="uid://pkepe7pjgc2b" path="res://assets/sounds/player/metal_footstep_3.wav" id="snd_foot3"]
[ext_resource type="AudioStream" uid="uid://dyuehvg24lj03" path="res://assets/sounds/player/generic_robot_jump.wav" id="snd_jump"]
[ext_resource type="AudioStream" uid="uid://gs31vrufsp0c" path="res://assets/sounds/player/generic_robot_land.wav" id="snd_land"]
[ext_resource type="AudioStream" uid="uid://cq1asfkaew4dg" path="res://assets/sounds/player/toggleLight_1.wav" id="snd_light"]
[ext_resource type="PackedScene" uid="uid://dhloxhv87q41u" path="res://assets/models/tumble/tumble.glb" id="tumble_model"]

[sub_resource type="CapsuleShape3D" id="capsule_standing"]
radius = 0.3
height = 1.58

[sub_resource type="CapsuleShape3D" id="capsule_crouching"]
radius = 0.3
height = 0.8

[sub_resource type="SceneReplicationConfig" id="repl_input"]
properties/0/path = NodePath("InputSync:input_direction")
properties/0/spawn = true
properties/0/replication_mode = 1
properties/1/path = NodePath("InputSync:camera_rotation_y")
properties/1/spawn = true
properties/1/replication_mode = 1
properties/2/path = NodePath("InputSync:camera_pitch")
properties/2/spawn = true
properties/2/replication_mode = 1
properties/3/path = NodePath("InputSync:wants_jump")
properties/3/spawn = true
properties/3/replication_mode = 2

[sub_resource type="SceneReplicationConfig" id="repl_state"]
properties/0/path = NodePath(".:sync_state")
properties/0/spawn = true
properties/0/replication_mode = 1

[node name="PlayerProcedural" type="CharacterBody3D" unique_id=1904082418]
floor_constant_speed = false
floor_max_angle = 1.047
floor_snap_length = 0.2
script = ExtResource("main_script")
pre_jump_delay = 0.08

[node name="CollisionStanding" type="CollisionShape3D" parent="." unique_id=1830871152]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0.79, 0)
shape = SubResource("capsule_standing")

[node name="CollisionCrouching" type="CollisionShape3D" parent="." unique_id=271172543]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0.4, 0)
shape = SubResource("capsule_crouching")
disabled = true

[node name="Model" type="Node3D" parent="." unique_id=1227009150]

[node name="TumbleModel" parent="Model" unique_id=212805555 instance=ExtResource("tumble_model")]
transform = Transform3D(0.65, 0, 0, 0, 0.65, 0, 0, 0, 0.65, 0, 0, 0)

[node name="GroundRay" type="RayCast3D" parent="." unique_id=117464559]
target_position = Vector3(0, -0.3, 0)

[node name="CameraHead" type="Node3D" parent="." unique_id=1440856860]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1.5, 0)

[node name="CameraPivot" type="Node3D" parent="CameraHead" unique_id=2007823602]

[node name="SpringArm3D" type="SpringArm3D" parent="CameraHead/CameraPivot" unique_id=1515971261]
spring_length = 3.0

[node name="Camera3D" type="Camera3D" parent="CameraHead/CameraPivot/SpringArm3D" unique_id=1190769031 groups=["player_camera"]]
fov = 90.0
far = 1000000.0

[node name="OmniLight3D" type="OmniLight3D" parent="." unique_id=78146334]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1, 0)
visible = false
omni_range = 10.0

[node name="Sounds" type="Node3D" parent="." unique_id=91357251]

[node name="Jump" type="AudioStreamPlayer3D" parent="Sounds" unique_id=1638580836]
stream = ExtResource("snd_jump")
bus = &"SFX"
max_polyphony = 3

[node name="Land" type="AudioStreamPlayer3D" parent="Sounds" unique_id=61242015]
stream = ExtResource("snd_land")
bus = &"SFX"
max_polyphony = 3

[node name="Footstep1" type="AudioStreamPlayer3D" parent="Sounds" unique_id=1711935969]
stream = ExtResource("snd_foot1")
bus = &"SFX"
max_polyphony = 3
volume_db = -8.0

[node name="Footstep2" type="AudioStreamPlayer3D" parent="Sounds" unique_id=1613345525]
stream = ExtResource("snd_foot2")
bus = &"SFX"
max_polyphony = 3

[node name="Footstep3" type="AudioStreamPlayer3D" parent="Sounds" unique_id=1548881891]
stream = ExtResource("snd_foot3")
bus = &"SFX"
max_polyphony = 3

[node name="ToggleLight" type="AudioStreamPlayer3D" parent="Sounds" unique_id=17363492]
stream = ExtResource("snd_light")
bus = &"SFX"
max_polyphony = 3

[node name="InputSync" type="Node" parent="." unique_id=642164301]
script = ExtResource("input_script")

[node name="InputSynchronizer" type="MultiplayerSynchronizer" parent="InputSync" unique_id=361459520]
root_path = NodePath("../..")
replication_interval = 0.05
replication_config = SubResource("repl_input")

[node name="PlayerSync" type="MultiplayerSynchronizer" parent="." unique_id=1311884529]
replication_config = SubResource("repl_state")

[node name="NameLabel" type="Label3D" parent="." unique_id=1245085201]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 2, 0)
text = ""
outline_size = 8