feat: implement first-person controller
This commit is contained in:
@@ -1,8 +1,11 @@
|
||||
[gd_scene format=4 uid="uid://bka1dmgdi5btd"]
|
||||
|
||||
[ext_resource type="Script" uid="uid://mjm7ghkibnxa" path="res://src/Features/Player/Godot/PlayerController.cs" id="1_gkqfc"]
|
||||
[ext_resource type="Script" uid="uid://mjm7ghkibnxa" path="res://src/Features/Players/Godot/PlayerController.cs" id="1_gkqfc"]
|
||||
[ext_resource type="Texture2D" uid="uid://bymgknsy145ap" path="res://assets/models/simple-character-psx_character_256.png" id="2_tduai"]
|
||||
|
||||
[sub_resource type="CapsuleShape3D" id="CapsuleShape3D_130ks"]
|
||||
radius = 0.25
|
||||
|
||||
[sub_resource type="StandardMaterial3D" id="StandardMaterial3D_sgsg4"]
|
||||
resource_name = "character_256"
|
||||
cull_mode = 2
|
||||
@@ -287,16 +290,21 @@ _surfaces = [{
|
||||
}]
|
||||
blend_shape_mode = 0
|
||||
|
||||
[sub_resource type="CapsuleShape3D" id="CapsuleShape3D_130ks"]
|
||||
radius = 0.25
|
||||
|
||||
[node name="Player" type="Node3D" unique_id=26823676 node_paths=PackedStringArray("characterBody3D")]
|
||||
[node name="Player" type="Node3D" unique_id=26823676 node_paths=PackedStringArray("Body", "Camera")]
|
||||
script = ExtResource("1_gkqfc")
|
||||
characterBody3D = NodePath("Mesh/CharacterBody3D")
|
||||
Body = NodePath("CharacterBody3D")
|
||||
Camera = NodePath("CharacterBody3D/Camera3D")
|
||||
|
||||
[node name="Mesh" type="Node3D" parent="." unique_id=388629767]
|
||||
[node name="CharacterBody3D" type="CharacterBody3D" parent="." unique_id=1327672780]
|
||||
|
||||
[node name="Skeleton3D" type="Skeleton3D" parent="Mesh" unique_id=183161254]
|
||||
[node name="CollisionShape3D" type="CollisionShape3D" parent="CharacterBody3D" unique_id=1006347064]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1, 0)
|
||||
shape = SubResource("CapsuleShape3D_130ks")
|
||||
|
||||
[node name="Mesh" type="Node3D" parent="CharacterBody3D" unique_id=388629767]
|
||||
transform = Transform3D(-1, 0, -8.742278e-08, 0, 1, 0, 8.742278e-08, 0, -1, 0, 0, 0)
|
||||
|
||||
[node name="Skeleton3D" type="Skeleton3D" parent="CharacterBody3D/Mesh" unique_id=183161254]
|
||||
transform = Transform3D(0.1225099, 0, 0, 0, 0.1225099, 0, 0, 0, 0.1225099, 0, 0, 0)
|
||||
bones/0/name = "spine"
|
||||
bones/0/parent = -1
|
||||
@@ -747,23 +755,22 @@ bones/63/position = Vector3(0.24846391, -0.054724697, 0.53722215)
|
||||
bones/63/rotation = Quaternion(-0.689515, 0.6895178, -0.15673877, -0.15673946)
|
||||
bones/63/scale = Vector3(1, 1, 1)
|
||||
|
||||
[node name="arms" type="MeshInstance3D" parent="Mesh/Skeleton3D" unique_id=1995581269]
|
||||
[node name="arms" type="MeshInstance3D" parent="CharacterBody3D/Mesh/Skeleton3D" unique_id=1995581269]
|
||||
mesh = SubResource("ArrayMesh_wr7hk")
|
||||
skin = SubResource("Skin_dmu40")
|
||||
skeleton = NodePath("..")
|
||||
|
||||
[node name="body" type="MeshInstance3D" parent="Mesh/Skeleton3D" unique_id=2033799835]
|
||||
[node name="body" type="MeshInstance3D" parent="CharacterBody3D/Mesh/Skeleton3D" unique_id=2033799835]
|
||||
mesh = SubResource("ArrayMesh_5ti08")
|
||||
skin = SubResource("Skin_dmu40")
|
||||
skeleton = NodePath("..")
|
||||
|
||||
[node name="head" type="MeshInstance3D" parent="Mesh/Skeleton3D" unique_id=1273139092]
|
||||
[node name="head" type="MeshInstance3D" parent="CharacterBody3D/Mesh/Skeleton3D" unique_id=1273139092]
|
||||
layers = 2
|
||||
mesh = SubResource("ArrayMesh_31tkm")
|
||||
skin = SubResource("Skin_dmu40")
|
||||
skeleton = NodePath("..")
|
||||
|
||||
[node name="CharacterBody3D" type="CharacterBody3D" parent="Mesh" unique_id=1327672780]
|
||||
|
||||
[node name="CollisionShape3D" type="CollisionShape3D" parent="Mesh/CharacterBody3D" unique_id=1006347064]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1, 0)
|
||||
shape = SubResource("CapsuleShape3D_130ks")
|
||||
[node name="Camera3D" type="Camera3D" parent="CharacterBody3D" unique_id=718409984]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1.817, 0)
|
||||
cull_mask = 1048573
|
||||
|
||||
Reference in New Issue
Block a user