fix state and make animations loop, refactoring animals ai
This commit is contained in:
@@ -2,6 +2,8 @@
|
||||
|
||||
[ext_resource type="PackedScene" uid="uid://clx701xdwelgx" path="res://core/ai/agents/base/ai_base.tscn" id="1_e5v3h"]
|
||||
[ext_resource type="PackedScene" uid="uid://dqhueybnlrrqx" path="res://core/ai/agents/horse/horse_mannequin.tscn" id="2_4t6jw"]
|
||||
[ext_resource type="Script" uid="uid://d3hy70ec8vqo5" path="res://core/ai/framework/run_animation_state.gd" id="2_or6xs"]
|
||||
[ext_resource type="Script" uid="uid://bngfthvt04ivv" path="res://core/ai/framework/patrol_state.gd" id="3_n63jb"]
|
||||
[ext_resource type="Animation" uid="uid://doyi6etqvy4n2" path="res://core/ai/agents/horse/idle.res" id="3_qe4rt"]
|
||||
[ext_resource type="Animation" uid="uid://hotr7r3fd1sq" path="res://core/ai/agents/horse/walking.res" id="4_q8m0v"]
|
||||
|
||||
@@ -24,10 +26,26 @@ visible = false
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, -0.2074585, 0.14794922)
|
||||
shape = SubResource("BoxShape3D_4t6jw")
|
||||
|
||||
[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=734754793]
|
||||
script = ExtResource("2_or6xs")
|
||||
state_id = &"idle"
|
||||
next_state_id = &"patrol"
|
||||
animation_name = "custom/idle"
|
||||
|
||||
[node name="PatrolState" type="Node" parent="StateMachine" index="1" unique_id=1748382252]
|
||||
script = ExtResource("3_n63jb")
|
||||
state_id = &"patrol"
|
||||
next_state_id = &"idle"
|
||||
animation_name = "custom/walking"
|
||||
exit_on_action_finished = true
|
||||
|
||||
[node name="HorseMannequin" parent="." index="5" unique_id=1289880358 instance=ExtResource("2_4t6jw")]
|
||||
transform = Transform3D(0.2, 0, 0, 0, 0.2, 0, 0, 0, 0.2, 0, -0.9, 0)
|
||||
|
||||
[node name="Skeleton3D" parent="HorseMannequin/Armature" parent_id_path=PackedInt32Array(1289880358, 502167939) index="0" unique_id=972507008]
|
||||
[node name="Skeleton3D" parent="HorseMannequin/Armature" parent_id_path=PackedInt32Array(1289880358, 245823720) index="0" unique_id=494955820]
|
||||
bones/1/rotation = Quaternion(0.7071068, -6.209646e-07, -6.209645e-07, 0.7071067)
|
||||
bones/4/rotation = Quaternion(0.0012952884, -0.0012955684, 0.7071056, 0.7071057)
|
||||
bones/5/rotation = Quaternion(0.70685357, -0.70227593, -0.04508998, 0.07164877)
|
||||
@@ -55,7 +73,7 @@ bones/33/rotation = Quaternion(0.7071068, -6.209646e-07, -6.209645e-07, 0.707106
|
||||
bones/35/rotation = Quaternion(0.7071068, -9.581396e-07, -9.581394e-07, 0.7071067)
|
||||
bones/37/rotation = Quaternion(0.7071068, -9.581396e-07, -9.581394e-07, 0.7071067)
|
||||
|
||||
[node name="AnimationPlayer" parent="HorseMannequin" index="1" unique_id=868895357]
|
||||
[node name="AnimationPlayer" parent="HorseMannequin" index="1" unique_id=272680130]
|
||||
libraries/custom = SubResource("AnimationLibrary_or6xs")
|
||||
|
||||
[editable path="HorseMannequin"]
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Reference in New Issue
Block a user