My first 3D game with Godot 4.4
This commit is contained in:
78
player/gun_model.tscn
Normal file
78
player/gun_model.tscn
Normal file
@@ -0,0 +1,78 @@
|
||||
[gd_scene load_steps=6 format=3 uid="uid://dkb2mu7n4t308"]
|
||||
|
||||
[ext_resource type="PackedScene" uid="uid://buif8h7ixc1cy" path="res://player/simple_gun/gun_model.glb" id="1_81uiy"]
|
||||
[ext_resource type="Script" uid="uid://dwu1ndn4oojx4" path="res://player/gun_model.gd" id="2_3tpoa"]
|
||||
|
||||
[sub_resource type="Animation" id="Animation_3tpoa"]
|
||||
length = 0.001
|
||||
tracks/0/type = "value"
|
||||
tracks/0/imported = false
|
||||
tracks/0/enabled = true
|
||||
tracks/0/path = NodePath("BlueGun:rotation")
|
||||
tracks/0/interp = 1
|
||||
tracks/0/loop_wrap = true
|
||||
tracks/0/keys = {
|
||||
"times": PackedFloat32Array(0),
|
||||
"transitions": PackedFloat32Array(1),
|
||||
"update": 0,
|
||||
"values": [Vector3(0, -1.5708, 0)]
|
||||
}
|
||||
tracks/1/type = "value"
|
||||
tracks/1/imported = false
|
||||
tracks/1/enabled = true
|
||||
tracks/1/path = NodePath("BlueGun:position")
|
||||
tracks/1/interp = 1
|
||||
tracks/1/loop_wrap = true
|
||||
tracks/1/keys = {
|
||||
"times": PackedFloat32Array(0),
|
||||
"transitions": PackedFloat32Array(1),
|
||||
"update": 0,
|
||||
"values": [Vector3(0, -0.299353, -0.146614)]
|
||||
}
|
||||
|
||||
[sub_resource type="Animation" id="Animation_81uiy"]
|
||||
resource_name = "recoil"
|
||||
length = 0.2
|
||||
tracks/0/type = "value"
|
||||
tracks/0/imported = false
|
||||
tracks/0/enabled = true
|
||||
tracks/0/path = NodePath("BlueGun:rotation")
|
||||
tracks/0/interp = 1
|
||||
tracks/0/loop_wrap = true
|
||||
tracks/0/keys = {
|
||||
"times": PackedFloat32Array(0, 0.05, 0.1, 0.15, 0.2),
|
||||
"transitions": PackedFloat32Array(1, 1, 1, 1, 1),
|
||||
"update": 0,
|
||||
"values": [Vector3(0, -1.5708, 0), Vector3(1.13133e-08, -1.5708, 0.261799), Vector3(1.85986e-08, -1.5708, 0.436332), Vector3(9.29928e-09, -1.5708, 0.218166), Vector3(0, -1.5708, 0)]
|
||||
}
|
||||
tracks/1/type = "value"
|
||||
tracks/1/imported = false
|
||||
tracks/1/enabled = true
|
||||
tracks/1/path = NodePath("BlueGun:position")
|
||||
tracks/1/interp = 1
|
||||
tracks/1/loop_wrap = true
|
||||
tracks/1/keys = {
|
||||
"times": PackedFloat32Array(0, 0.1, 0.15, 0.2),
|
||||
"transitions": PackedFloat32Array(1, 1, 1, 1),
|
||||
"update": 0,
|
||||
"values": [Vector3(0, -0.299353, -0.146614), Vector3(0, -0.299353, -0.246614), Vector3(0, -0.299353, -0.196614), Vector3(0, -0.299353, -0.146614)]
|
||||
}
|
||||
|
||||
[sub_resource type="AnimationLibrary" id="AnimationLibrary_3tpoa"]
|
||||
_data = {
|
||||
&"RESET": SubResource("Animation_3tpoa"),
|
||||
&"recoil": SubResource("Animation_81uiy")
|
||||
}
|
||||
|
||||
[node name="gun_model" instance=ExtResource("1_81uiy")]
|
||||
script = ExtResource("2_3tpoa")
|
||||
|
||||
[node name="BlueGun" parent="." index="0"]
|
||||
transform = Transform3D(-3.61999e-06, 0, -1, 0, 1, 0, 1, 0, -3.61999e-06, 0, -0.299353, -0.146614)
|
||||
|
||||
[node name="AnimationPlayer" type="AnimationPlayer" parent="." index="1"]
|
||||
unique_name_in_owner = true
|
||||
libraries = {
|
||||
&"": SubResource("AnimationLibrary_3tpoa")
|
||||
}
|
||||
speed_scale = 1.25
|
||||
Reference in New Issue
Block a user