1
- [gd_scene load_steps =13 format =3 uid ="uid://5b1fwnd8pyyc" ]
1
+ [gd_scene load_steps =26 format =3 uid ="uid://5b1fwnd8pyyc" ]
2
2
3
3
[ext_resource type ="Script" path ="res://godot_plushie/godot_plushie.gd" id ="1_7ltfj" ]
4
4
[ext_resource type ="Shader" path ="res://materials/highlight_by_normal.gdshader" id ="2_drmmc" ]
5
5
[ext_resource type ="PackedScene" uid ="uid://4qv1ic25pm3g" path ="res://godot_plushie/plushie_visual_only.tscn" id ="3_nbn1n" ]
6
+ [ext_resource type ="Script" path ="res://godot_plushie/plushie_detector.gd" id ="4_salng" ]
6
7
[ext_resource type ="Script" path ="res://godot_plushie/statemachine/statemachine.gd" id ="5_nl81g" ]
7
- [ext_resource type ="Script" path ="res://godot_plushie/idle_state.gd" id ="6_3onee" ]
8
- [ext_resource type ="Script" path ="res://godot_plushie/frozen_state.gd" id ="7_7d5w8" ]
9
- [ext_resource type ="Script" path ="res://godot_plushie/falling_state.gd" id ="7_s0i25" ]
10
- [ext_resource type ="Script" path ="res://godot_plushie/picked_up_state.gd" id ="9_lh4d6" ]
11
- [ext_resource type ="Script" path ="res://godot_plushie/jumping_for_food_state.gd" id ="9_n6vq4" ]
8
+ [ext_resource type ="Script" path ="res://godot_plushie/statemachine/states/idle_state.gd" id ="6_3onee" ]
9
+ [ext_resource type ="Script" path ="res://godot_plushie/statemachine/states/frozen_state.gd" id ="7_7d5w8" ]
10
+ [ext_resource type ="Script" path ="res://godot_plushie/statemachine/states/falling_state.gd" id ="7_s0i25" ]
11
+ [ext_resource type ="Script" path ="res://godot_plushie/statemachine/states/picked_up_state.gd" id ="9_lh4d6" ]
12
+ [ext_resource type ="Script" path ="res://godot_plushie/statemachine/states/jumping_for_food_state.gd" id ="9_n6vq4" ]
13
+ [ext_resource type ="Script" path ="res://godot_plushie/statemachine/states/move_to_state.gd" id ="10_2lf8p" ]
14
+ [ext_resource type ="Script" path ="res://godot_plushie/sad_state.gd" id ="12_36y4b" ]
15
+ [ext_resource type ="Script" path ="res://godot_plushie/sleep_state.gd" id ="13_nkr01" ]
16
+ [ext_resource type ="Texture2D" uid ="uid://dcmkq5hitdvrk" path ="res://assets/images/z.png" id ="14_1oi5n" ]
12
17
13
18
[sub_resource type ="ShaderMaterial" id ="ShaderMaterial_jl0g4" ]
14
19
render_priority = 0
@@ -19,38 +24,87 @@ shader_parameter/specular = 0.5
19
24
shader_parameter/metallic = null
20
25
shader_parameter/roughness = 1.0
21
26
22
- [sub_resource type ="BoxShape3D" id ="BoxShape3D_x2ken" ]
23
- size = Vector3 (0.1 , 0.15 , 0.1 )
27
+ [sub_resource type ="CapsuleShape3D" id ="CapsuleShape3D_224wo" ]
28
+ margin = 0.01
29
+ radius = 0.05
30
+ height = 0.15
31
+
32
+ [sub_resource type ="SphereShape3D" id ="SphereShape3D_grwlp" ]
33
+ radius = 0.0770797
24
34
25
35
[sub_resource type ="SphereShape3D" id ="SphereShape3D_5vt2m" ]
26
- radius = 0.3
36
+ radius = 0.2
37
+
38
+ [sub_resource type ="StandardMaterial3D" id ="StandardMaterial3D_2a3mu" ]
39
+ transparency = 1
40
+ shading_mode = 0
41
+ albedo_texture = ExtResource ("14_1oi5n" )
42
+ billboard_mode = 3
43
+ billboard_keep_scale = true
44
+ particles_anim_h_frames = 1
45
+ particles_anim_v_frames = 1
46
+ particles_anim_loop = false
47
+
48
+ [sub_resource type ="Curve" id ="Curve_dpdwo" ]
49
+ _data = [Vector2 (0 , 0.978022 ), 0.0 , 0.0 , 0 , 0 , Vector2 (1 , 0.120879 ), -3.01099 , 0.0 , 0 , 0 ]
50
+ point_count = 2
51
+
52
+ [sub_resource type ="CurveTexture" id ="CurveTexture_ol181" ]
53
+ curve = SubResource ("Curve_dpdwo" )
54
+
55
+ [sub_resource type ="Curve" id ="Curve_lvtns" ]
56
+ _data = [Vector2 (0 , 0.252747 ), 0.0 , 5.1617 , 0 , 0 , Vector2 (0.233577 , 1 ), 4 .66619e-07, 4 .66619e-07, 0 , 0 , Vector2 (1 , 0 ), -2.39108 , 0.0 , 0 , 0 ]
57
+ point_count = 3
58
+
59
+ [sub_resource type ="CurveTexture" id ="CurveTexture_ntjny" ]
60
+ curve = SubResource ("Curve_lvtns" )
61
+
62
+ [sub_resource type ="ParticleProcessMaterial" id ="ParticleProcessMaterial_c7eyl" ]
63
+ gravity = Vector3 (0 , 0.1 , 0 )
64
+ scale_curve = SubResource ("CurveTexture_ntjny" )
65
+ alpha_curve = SubResource ("CurveTexture_ol181" )
66
+ turbulence_enabled = true
67
+ turbulence_noise_scale = 6.045
68
+
69
+ [sub_resource type ="QuadMesh" id ="QuadMesh_el381" ]
70
+ size = Vector2 (0.05 , 0.05 )
27
71
28
72
[node name ="GodotPlushie" type ="CharacterBody3D" groups =["unfreeze_on_start" ]]
29
73
script = ExtResource ("1_7ltfj" )
30
74
snap_on_pickup = false
31
75
highlight_material = SubResource ("ShaderMaterial_jl0g4" )
32
76
33
- [node name ="CollisionShape3D " type ="CollisionShape3D" parent ="." ]
77
+ [node name ="GroundCollision " type ="CollisionShape3D" parent ="." ]
34
78
transform = Transform3D (1 , 0 , 0 , 0 , 1 , 0 , 0 , 0 , 1 , 0 , 0.075 , 0 )
35
- shape = SubResource ("BoxShape3D_x2ken" )
79
+ shape = SubResource ("CapsuleShape3D_224wo" )
80
+
81
+ [node name ="HeadCollision" type ="CollisionShape3D" parent ="." ]
82
+ transform = Transform3D (1 , 0 , 0 , 0 , 1 , 0 , 0 , 0 , 1 , 0 , 0.0869923 , 0 )
83
+ shape = SubResource ("SphereShape3D_grwlp" )
36
84
37
85
[node name ="Plushie" parent ="." instance =ExtResource ("3_nbn1n" )]
38
86
39
- [node name ="FoodDetector " type ="Area3D" parent ="." ]
87
+ [node name ="PlushieDetector " type ="Area3D" parent ="." ]
40
88
transform = Transform3D (1 , 0 , 0 , 0 , 1 , 0 , 0 , 0 , 1 , 0 , 0.05 , 0 )
41
89
collision_layer = 2
42
90
collision_mask = 2
91
+ script = ExtResource ("4_salng" )
43
92
44
- [node name ="CollisionShape3D" type ="CollisionShape3D" parent ="FoodDetector " ]
93
+ [node name ="CollisionShape3D" type ="CollisionShape3D" parent ="PlushieDetector " ]
45
94
shape = SubResource ("SphereShape3D_5vt2m" )
46
95
47
- [node name ="StateMachine" type ="Node3D" parent ="." node_paths =PackedStringArray ("state" )]
96
+ [node name ="StateMachine" type ="Node3D" parent ="." node_paths =PackedStringArray ("plushie" , "animator" , "navigation_agent" , "plushie_detector" , " state" )]
48
97
script = ExtResource ("5_nl81g" )
98
+ plushie = NodePath (".." )
99
+ animator = NodePath ("../Plushie" )
100
+ navigation_agent = NodePath ("../NavigationAgent3D" )
101
+ plushie_detector = NodePath ("../PlushieDetector" )
49
102
state = NodePath ("FrozenState" )
50
103
51
104
[node name ="StateLabel" type ="Label3D" parent ="StateMachine" ]
52
105
transform = Transform3D (1 , 0 , 0 , 0 , 1 , 0 , 0 , 0 , 1 , 0 , 0.191594 , 0 )
53
- pixel_size = 0.002
106
+ visible = false
107
+ pixel_size = 0.001
54
108
text = "Hello"
55
109
vertical_alignment = 2
56
110
@@ -69,5 +123,32 @@ script = ExtResource("9_lh4d6")
69
123
[node name ="JumpingForFoodState" type ="Node3D" parent ="StateMachine" ]
70
124
script = ExtResource ("9_n6vq4" )
71
125
126
+ [node name ="MoveToState" type ="Node3D" parent ="StateMachine" ]
127
+ script = ExtResource ("10_2lf8p" )
128
+
129
+ [node name ="From" type ="Node3D" parent ="StateMachine/MoveToState" ]
130
+ transform = Transform3D (1 , 0 , 0 , 0 , 1 , 0 , 0 , 0 , 1 , 0 , 0.05 , 0.07 )
131
+
132
+ [node name ="To" type ="Node3D" parent ="StateMachine/MoveToState" ]
133
+ transform = Transform3D (1 , 0 , 0 , 0 , 1 , 0 , 0 , 0 , 1 , 0 , -0.05 , 0.07 )
134
+
135
+ [node name ="SadState" type ="Node3D" parent ="StateMachine" ]
136
+ script = ExtResource ("12_36y4b" )
137
+
138
+ [node name ="SleepState" type ="Node3D" parent ="StateMachine" ]
139
+ script = ExtResource ("13_nkr01" )
140
+
141
+ [node name ="GPUParticles3D" type ="GPUParticles3D" parent ="StateMachine/SleepState" ]
142
+ transform = Transform3D (1 , 0 , 0 , 0 , 1 , 0 , 0 , 0 , 1 , 0 , 0.0643394 , 0.0959583 )
143
+ material_override = SubResource ("StandardMaterial3D_2a3mu" )
144
+ emitting = false
145
+ amount = 3
146
+ lifetime = 2.0
147
+ process_material = SubResource ("ParticleProcessMaterial_c7eyl" )
148
+ draw_pass_1 = SubResource ("QuadMesh_el381" )
149
+
72
150
[node name ="NavigationAgent3D" type ="NavigationAgent3D" parent ="." ]
73
151
unique_name_in_owner = true
152
+ path_desired_distance = 0.1
153
+ target_desired_distance = 0.1
154
+ path_max_distance = 1.01
0 commit comments