Add per-weapon scene and better first person view

This commit is contained in:
2025-01-25 17:24:57 +01:00
parent 1f1f2918c9
commit 1c8458048c
20 changed files with 3761 additions and 15 deletions

View File

@ -0,0 +1,7 @@
[gd_scene format=3 uid="uid://dv23lxk4hr8io"]
[node name="FirstViewGenericGun" type="Node3D"]
[node name="TestCamera" type="Camera3D" parent="."]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -1.49377, 1.45724, 5.45639)
fov = 40.0

View File

@ -1,6 +1,6 @@
[gd_scene load_steps=4 format=3 uid="uid://b10lpwfjgxds4"]
[gd_scene load_steps=8 format=3 uid="uid://b10lpwfjgxds4"]
[ext_resource type="Script" path="res://scripts/player/player_input_contrller.gd" id="1_q75ai"]
[ext_resource type="Script" path="res://scripts/player/player_input_controller.gd" id="1_q75ai"]
[sub_resource type="CapsuleShape3D" id="CapsuleShape3D_jc50w"]
radius = 0.3
@ -14,6 +14,63 @@ properties/1/path = NodePath(".:rotation")
properties/1/spawn = true
properties/1/replication_mode = 1
[sub_resource type="Animation" id="Animation_falg4"]
length = 0.001
tracks/0/type = "value"
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/path = NodePath(".:position")
tracks/0/interp = 1
tracks/0/loop_wrap = true
tracks/0/keys = {
"times": PackedFloat32Array(0.125),
"transitions": PackedFloat32Array(1),
"update": 0,
"values": [Vector3(0, 0, 0)]
}
[sub_resource type="Animation" id="Animation_mkk0p"]
resource_name = "move"
length = 0.5
loop_mode = 1
tracks/0/type = "value"
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/path = NodePath(".:position")
tracks/0/interp = 1
tracks/0/loop_wrap = true
tracks/0/keys = {
"times": PackedFloat32Array(0, 0.125, 0.25, 0.375, 0.5),
"transitions": PackedFloat32Array(1, 2, 1, 2, 1),
"update": 0,
"values": [Vector3(0, 0, 0), Vector3(0.001, 0.001, -0.001), Vector3(0, 0, 0), Vector3(-0.001, 0.001, -0.001), Vector3(0, 0, 0)]
}
[sub_resource type="Animation" id="Animation_ah507"]
resource_name = "shooting"
length = 0.2
loop_mode = 1
step = 0.1
tracks/0/type = "value"
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/path = NodePath(".:position")
tracks/0/interp = 1
tracks/0/loop_wrap = true
tracks/0/keys = {
"times": PackedFloat32Array(0, 0.1, 0.2),
"transitions": PackedFloat32Array(1, 0.233258, 8.57419),
"update": 0,
"values": [Vector3(0, 0, 0), Vector3(0, -0.01, -0.01), Vector3(0, 0, 0)]
}
[sub_resource type="AnimationLibrary" id="AnimationLibrary_u1b6p"]
_data = {
"RESET": SubResource("Animation_falg4"),
"move": SubResource("Animation_mkk0p"),
"shooting": SubResource("Animation_ah507")
}
[node name="CharacterPlaceholder" type="CharacterBody3D"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0.799455, 0)
collision_layer = 9
@ -35,5 +92,12 @@ fov = 40.0
[node name="BulletStartingPoint" type="Node3D" parent="FirstPersonCameraMount"]
transform = Transform3D(-1, 0, -8.74228e-08, 0, 1, 0, 8.74228e-08, 0, -1, 0, 0, -0.343115)
[node name="GunMount" type="Node3D" parent="FirstPersonCameraMount"]
[node name="AnimationPlayer" type="AnimationPlayer" parent="FirstPersonCameraMount/GunMount"]
libraries = {
"": SubResource("AnimationLibrary_u1b6p")
}
[node name="ModelMount" type="Node3D" parent="."]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, -0.790262, 0)