Files
godot-4-3d-tutorial/mob.tscn
2024-06-12 17:51:29 +02:00

94 lines
2.7 KiB
Plaintext

[gd_scene load_steps=7 format=3 uid="uid://h2hapmuai55b"]
[ext_resource type="Script" path="res://Mob.gd" id="1_fih7b"]
[ext_resource type="PackedScene" uid="uid://gqs4tdvjq5vi" path="res://art/mob.glb" id="2_0f7cl"]
[sub_resource type="BoxShape3D" id="BoxShape3D_vwmkp"]
size = Vector3(2.5, 1.5, 3.5)
[sub_resource type="Animation" id="Animation_g67lg"]
length = 0.001
tracks/0/type = "value"
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/path = NodePath("Pivot/Character:position")
tracks/0/interp = 1
tracks/0/loop_wrap = true
tracks/0/keys = {
"times": PackedFloat32Array(0),
"transitions": PackedFloat32Array(1),
"update": 0,
"values": [Vector3(0, 0, 0)]
}
tracks/1/type = "value"
tracks/1/imported = false
tracks/1/enabled = true
tracks/1/path = NodePath("Pivot/Character:rotation")
tracks/1/interp = 1
tracks/1/loop_wrap = true
tracks/1/keys = {
"times": PackedFloat32Array(0),
"transitions": PackedFloat32Array(1),
"update": 0,
"values": [Vector3(0, 0, 0)]
}
[sub_resource type="Animation" id="Animation_ja4nm"]
resource_name = "float"
length = 1.2
loop_mode = 1
tracks/0/type = "value"
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/path = NodePath("Pivot/Character:position")
tracks/0/interp = 1
tracks/0/loop_wrap = true
tracks/0/keys = {
"times": PackedFloat32Array(0.3, 0.7, 1.2),
"transitions": PackedFloat32Array(2.14126, 1, 1),
"update": 0,
"values": [Vector3(0, 0, 0), Vector3(0, 0.65, 0), Vector3(0, 0.35, 0)]
}
tracks/1/type = "value"
tracks/1/imported = false
tracks/1/enabled = true
tracks/1/path = NodePath("Pivot/Character:rotation")
tracks/1/interp = 1
tracks/1/loop_wrap = true
tracks/1/keys = {
"times": PackedFloat32Array(0.1, 0.5, 1.2),
"transitions": PackedFloat32Array(0.42, 1, 1),
"update": 0,
"values": [Vector3(0, 0, 0), Vector3(0.139626, 0, 0), Vector3(-0.15708, 0, 0)]
}
[sub_resource type="AnimationLibrary" id="AnimationLibrary_x0i7m"]
_data = {
"RESET": SubResource("Animation_g67lg"),
"float": SubResource("Animation_ja4nm")
}
[node name="Mob" type="CharacterBody3D" groups=["mob"]]
collision_layer = 2
collision_mask = 0
script = ExtResource("1_fih7b")
[node name="Pivot" type="Node3D" parent="."]
[node name="Character" parent="Pivot" instance=ExtResource("2_0f7cl")]
[node name="CollisionShape3D" type="CollisionShape3D" parent="."]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0.25, 0.25)
shape = SubResource("BoxShape3D_vwmkp")
[node name="VisibilityNotifier" type="VisibleOnScreenNotifier3D" parent="."]
aabb = AABB(-1.5, -1, -2, 3, 2, 4)
[node name="AnimationPlayer" type="AnimationPlayer" parent="."]
libraries = {
"": SubResource("AnimationLibrary_x0i7m")
}
autoplay = "float"
[connection signal="screen_exited" from="VisibilityNotifier" to="." method="_on_visibility_notifier_screen_exited"]