-
Notifications
You must be signed in to change notification settings - Fork 0
/
playerAndCamera.tscn
135 lines (113 loc) · 6.09 KB
/
playerAndCamera.tscn
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
[gd_scene load_steps=16 format=3 uid="uid://cqu6j7wde77yx"]
[ext_resource type="PhysicsMaterial" uid="uid://cmjo4d6fk86" path="res://materials/physicsmaterial/player.tres" id="1_7cbay"]
[ext_resource type="PackedScene" uid="uid://ctaisndoga7m8" path="res://addons/quick_primitives/scenes/Capsule.tscn" id="1_kfg1m"]
[ext_resource type="Script" path="res://code/playerController.gd" id="1_n1wsb"]
[ext_resource type="AudioStream" uid="uid://cmx8ot70pqptx" path="res://voices/deathscream.ogg" id="2_l8cue"]
[ext_resource type="Script" path="res://code/camerarotate.gd" id="2_q1wda"]
[ext_resource type="Material" uid="uid://ddhmff0i136ph" path="res://materials/player.tres" id="2_xse6y"]
[ext_resource type="Material" uid="uid://cm3667bo8x0ae" path="res://materials/player_detail.tres" id="4_2xtvh"]
[ext_resource type="AudioStream" uid="uid://bbjww16a20cf6" path="res://voices/jump.ogg" id="4_71htg"]
[ext_resource type="AudioStream" uid="uid://dblxjnng7fxug" path="res://voices/dbljump.ogg" id="5_yy7rl"]
[ext_resource type="AudioStream" uid="uid://dfggtsf3q4bmp" path="res://voices/ouch.ogg" id="6_ik0hw"]
[sub_resource type="CapsuleShape3D" id="CapsuleShape3D_kh2wg"]
[sub_resource type="CapsuleShape3D" id="CapsuleShape3D_jenem"]
radius = 0.45
[sub_resource type="CapsuleShape3D" id="CapsuleShape3D_yrfrg"]
radius = 0.1
height = 0.3
[sub_resource type="CapsuleShape3D" id="CapsuleShape3D_1w2qt"]
radius = 0.1
height = 0.8
[sub_resource type="AudioStreamPolyphonic" id="AudioStreamPolyphonic_74xuo"]
[node name="Player" type="Node3D"]
metadata/lockCamera = true
[node name="PlayerBody" type="RigidBody3D" parent="." node_paths=PackedStringArray("onGroundShape", "stepup_aircast", "stepup_groundcast", "backstepup_aircast", "backstepup_groundcast", "CamNode", "PlayerVisual", "aPlayer")]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0.014007, 0)
collision_layer = 128
collision_mask = 4294967167
axis_lock_angular_x = true
axis_lock_angular_y = true
axis_lock_angular_z = true
mass = 10.0
physics_material_override = ExtResource("1_7cbay")
can_sleep = false
continuous_cd = true
script = ExtResource("1_n1wsb")
onGroundShape = NodePath("CollisionShape3D/Capsule/ShapeCast3D")
stepup_aircast = NodePath("CollisionShape3D/Capsule/stepup_aircast")
stepup_groundcast = NodePath("CollisionShape3D/Capsule/stepup_groundcast")
backstepup_aircast = NodePath("CollisionShape3D/Capsule/backstepup_aircast")
backstepup_groundcast = NodePath("CollisionShape3D/Capsule/backstepup_groundcast")
moveForce = 160.0
stepForce = 112.0
jumpForce = 88.0
CamNode = NodePath("CollisionShape3D/SpringArm3D")
PlayerVisual = NodePath("CollisionShape3D/Capsule")
aPlayer = NodePath("AudioPlayer")
DeathSound = ExtResource("2_l8cue")
JumpSound = ExtResource("4_71htg")
DblJumpSound = ExtResource("5_yy7rl")
HurtSound = ExtResource("6_ik0hw")
[node name="CollisionShape3D" type="CollisionShape3D" parent="PlayerBody"]
shape = SubResource("CapsuleShape3D_kh2wg")
[node name="Capsule" parent="PlayerBody/CollisionShape3D" instance=ExtResource("1_kfg1m")]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, -0.014007, 0)
skeleton = NodePath("../../..")
surface_material_override/0 = ExtResource("2_xse6y")
[node name="AudioListener3D" type="AudioListener3D" parent="PlayerBody/CollisionShape3D/Capsule"]
[node name="Capsule2" parent="PlayerBody/CollisionShape3D/Capsule" instance=ExtResource("1_kfg1m")]
transform = Transform3D(0.2, 0, 0, 0, 0.2, 0, 0, 0, 0.2, -0.10726, 0.366364, 0.466358)
material_override = ExtResource("4_2xtvh")
skeleton = NodePath("../../../..")
[node name="Capsule3" parent="PlayerBody/CollisionShape3D/Capsule" instance=ExtResource("1_kfg1m")]
transform = Transform3D(0.2, 0, 0, 0, 0.2, 0, 0, 0, 0.2, 0.126151, 0.366364, 0.466358)
material_override = ExtResource("4_2xtvh")
skeleton = NodePath("../../../..")
[node name="Capsule4" parent="PlayerBody/CollisionShape3D/Capsule" instance=ExtResource("1_kfg1m")]
transform = Transform3D(-8.74228e-09, 0.2, 0, -0.2, -8.74228e-09, 0, 0, 0, 0.2, 0.0167236, -0.17396, 0.466358)
material_override = ExtResource("4_2xtvh")
skeleton = NodePath("../../../..")
[node name="ShapeCast3D" type="ShapeCast3D" parent="PlayerBody/CollisionShape3D/Capsule"]
shape = SubResource("CapsuleShape3D_jenem")
target_position = Vector3(0, -0.04, 0)
max_results = 1
collision_mask = 4294967167
[node name="stepup_aircast" type="ShapeCast3D" parent="PlayerBody/CollisionShape3D/Capsule"]
transform = Transform3D(1, 0, 0, 0, -4.37114e-08, 1, 0, -1, -4.37114e-08, 0, 0, 0.421631)
shape = SubResource("CapsuleShape3D_yrfrg")
target_position = Vector3(0, -0.1, 0)
max_results = 1
[node name="stepup_groundcast" type="ShapeCast3D" parent="PlayerBody/CollisionShape3D/Capsule"]
transform = Transform3D(1, 0, 0, 0, -4.37114e-08, 1, 0, -1, -4.37114e-08, 0, -0.753181, 0.312401)
shape = SubResource("CapsuleShape3D_1w2qt")
target_position = Vector3(0, -0.1, 0)
max_results = 1
[node name="backstepup_aircast" type="ShapeCast3D" parent="PlayerBody/CollisionShape3D/Capsule"]
transform = Transform3D(-1, 8.74228e-08, 3.82137e-15, 0, -4.37114e-08, 1, 8.74228e-08, 1, 4.37114e-08, 0, 0, -0.392425)
shape = SubResource("CapsuleShape3D_yrfrg")
target_position = Vector3(0, -0.1, 0)
max_results = 1
[node name="backstepup_groundcast" type="ShapeCast3D" parent="PlayerBody/CollisionShape3D/Capsule"]
transform = Transform3D(-1, 8.74228e-08, 3.82137e-15, 0, -4.37114e-08, 1, 8.74228e-08, 1, 4.37114e-08, 0, -0.753181, -0.300685)
shape = SubResource("CapsuleShape3D_1w2qt")
target_position = Vector3(0, -0.1, 0)
max_results = 1
[node name="SpringArm3D" type="SpringArm3D" parent="PlayerBody/CollisionShape3D" node_paths=PackedStringArray("PlayerObj")]
transform = Transform3D(-1, 0, -8.74228e-08, 0, 1, 0, 8.74228e-08, 0, -1, 0, 0, 0)
collision_mask = 3
spring_length = 4.0
margin = 0.1
script = ExtResource("2_q1wda")
minclampX = -69.0
maxclampX = 5.0
zoomStrength = 7.0
PlayerObj = NodePath("../../..")
[node name="Camera3D" type="Camera3D" parent="PlayerBody/CollisionShape3D/SpringArm3D"]
keep_aspect = 0
fov = 99.0
near = 0.009
far = 1600.0
[node name="AudioPlayer" type="AudioStreamPlayer" parent="PlayerBody"]
stream = SubResource("AudioStreamPolyphonic_74xuo")
autoplay = true
max_polyphony = 10