fix state and make animations loop, refactoring animals ai
This commit is contained in:
@@ -1,9 +1,11 @@
|
||||
[gd_scene format=3 uid="uid://2md4l83fy8kr"]
|
||||
|
||||
[ext_resource type="PackedScene" uid="uid://clx701xdwelgx" path="res://core/ai/agents/base/ai_base.tscn" id="1_0bu1i"]
|
||||
[ext_resource type="Script" uid="uid://d3hy70ec8vqo5" path="res://core/ai/framework/run_animation_state.gd" id="2_iapui"]
|
||||
[ext_resource type="PackedScene" uid="uid://c16j3umhplew4" path="res://core/ai/agents/pug/pug_mannequin.tscn" id="2_n0mit"]
|
||||
[ext_resource type="Animation" uid="uid://cwrfo6h44qghm" path="res://core/ai/agents/pug/idle.res" id="3_hv1px"]
|
||||
[ext_resource type="Animation" uid="uid://dbv2ikwa8h4nb" path="res://core/ai/agents/pug/walking.res" id="4_cjq2y"]
|
||||
[ext_resource type="Animation" uid="uid://c8hy2tftqb7su" path="res://core/ai/agents/pug/idle.res" id="3_hv1px"]
|
||||
[ext_resource type="Script" uid="uid://bngfthvt04ivv" path="res://core/ai/framework/patrol_state.gd" id="3_xc1yq"]
|
||||
[ext_resource type="Animation" uid="uid://bqrhidcnublea" path="res://core/ai/agents/pug/walking.res" id="4_cjq2y"]
|
||||
|
||||
[sub_resource type="AnimationLibrary" id="AnimationLibrary_iapui"]
|
||||
_data = {
|
||||
@@ -17,10 +19,26 @@ anim_player = NodePath("PugMannequin/AnimationPlayer")
|
||||
[node name="MeshInstance3D" parent="." index="0" unique_id=214482161]
|
||||
visible = false
|
||||
|
||||
[node name="StateMachine" parent="." index="3" unique_id=1286404264 node_paths=PackedStringArray("initial_state")]
|
||||
initial_state = NodePath("IdleState")
|
||||
|
||||
[node name="IdleState" type="Node" parent="StateMachine" index="0" unique_id=1079848975]
|
||||
script = ExtResource("2_iapui")
|
||||
state_id = &"idle"
|
||||
next_state_id = &"patrol"
|
||||
animation_name = "custom/idle"
|
||||
|
||||
[node name="PatrolState" type="Node" parent="StateMachine" index="1" unique_id=1573670396]
|
||||
script = ExtResource("3_xc1yq")
|
||||
state_id = &"patrol"
|
||||
next_state_id = &"idle"
|
||||
animation_name = "custom/walking"
|
||||
exit_on_action_finished = true
|
||||
|
||||
[node name="PugMannequin" parent="." index="5" unique_id=1732134047 instance=ExtResource("2_n0mit")]
|
||||
transform = Transform3D(0.2, 0, 0, 0, 0.2, 0, 0, 0, 0.2, 0, -0.9, 0)
|
||||
|
||||
[node name="Skeleton3D" parent="PugMannequin/Armature" parent_id_path=PackedInt32Array(1732134047, 251322627) index="0" unique_id=1067550931]
|
||||
[node name="Skeleton3D" parent="PugMannequin/Armature" parent_id_path=PackedInt32Array(1732134047, 199608791) index="0" unique_id=33809722]
|
||||
bones/8/position = Vector3(-0.0054483665, 0.008346455, -0.020266803)
|
||||
bones/8/rotation = Quaternion(-0.007561639, 0.007561228, 0.70706636, 0.70706636)
|
||||
bones/9/rotation = Quaternion(0.6665347, -0.6790185, 0.20055033, -0.23333457)
|
||||
@@ -34,7 +52,7 @@ bones/20/rotation = Quaternion(0.6013276, -0.007656022, 0.017799761, 0.79876757)
|
||||
bones/24/rotation = Quaternion(-0.45064288, -0.22904137, 0.090387635, 0.858074)
|
||||
bones/27/rotation = Quaternion(0.05229574, 5.703821e-05, -0.025155801, 0.99831474)
|
||||
|
||||
[node name="AnimationPlayer" parent="PugMannequin" index="1" unique_id=2146190163]
|
||||
[node name="AnimationPlayer" parent="PugMannequin" index="1" unique_id=1653203922]
|
||||
libraries/custom = SubResource("AnimationLibrary_iapui")
|
||||
|
||||
[editable path="PugMannequin"]
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Reference in New Issue
Block a user