Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add basic spider logic #3

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
133 changes: 84 additions & 49 deletions prefabs/firefly.tscn
Original file line number Diff line number Diff line change
@@ -1,8 +1,31 @@
[gd_scene load_steps=25 format=4 uid="uid://d0a8bslojb72b"]
[gd_scene load_steps=27 format=4 uid="uid://d0a8bslojb72b"]

[ext_resource type="Script" path="res://scripts/draw_path.gd" id="1_sw5t1"]
[ext_resource type="Texture2D" uid="uid://j74mnqrk84mg" path="res://assets/firefly_sculpt_sculpt/textures/Material.003_baseColor.png" id="1_vt26d"]
[ext_resource type="Texture2D" uid="uid://cbif1hongtaw2" path="res://assets/firefly_sculpt_sculpt/textures/Material.001_baseColor.png" id="2_7cn4h"]

[sub_resource type="Animation" id="Animation_m8ubr"]
resource_name = "flap"
length = 0.2
loop_mode = 1
tracks/0/type = "value"
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/path = NodePath("PlayerPath/PlayerPathFollow/Player/model/Sculpt_fbx/Object_2/RootNode/Extracted_Cube_000/Extracted_Cube_000_Material_0:rotation")
tracks/0/interp = 2
tracks/0/loop_wrap = true
tracks/0/keys = {
"times": PackedFloat32Array(0, 0.0666667, 0.133333, 0.2),
"transitions": PackedFloat32Array(1, 1, 1, 1),
"update": 0,
"values": [Vector3(0, 0, 0), Vector3(0.637045, 0, 0), Vector3(0.637045, 0, 0), Vector3(0, 0, 0)]
}

[sub_resource type="AnimationLibrary" id="AnimationLibrary_wwvw8"]
_data = {
"flap": SubResource("Animation_m8ubr")
}

[sub_resource type="StandardMaterial3D" id="StandardMaterial3D_jcokh"]
resource_name = "Material"
cull_mode = 2
Expand Down Expand Up @@ -296,100 +319,112 @@ _surfaces = [{
blend_shape_mode = 0
shadow_mesh = SubResource("ArrayMesh_wlojk")

[sub_resource type="Animation" id="Animation_m8ubr"]
resource_name = "flap"
length = 0.2
loop_mode = 1
tracks/0/type = "value"
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/path = NodePath("Sketchfab_model/Sculpt_fbx/Object_2/RootNode/Extracted_Cube_000/Extracted_Cube_000_Material_0:rotation")
tracks/0/interp = 2
tracks/0/loop_wrap = true
tracks/0/keys = {
"times": PackedFloat32Array(0, 0.0666667, 0.133333, 0.2),
"transitions": PackedFloat32Array(1, 1, 1, 1),
"update": 0,
"values": [Vector3(0, 0, 0), Vector3(0.637045, 0, 0), Vector3(0.637045, 0, 0), Vector3(0, 0, 0)]
}

[sub_resource type="AnimationLibrary" id="AnimationLibrary_wwvw8"]
_data = {
"flap": SubResource("Animation_m8ubr")
}
[sub_resource type="SphereShape3D" id="SphereShape3D_kv6fh"]
radius = 0.1

[node name="firefly" type="Node3D"]
script = ExtResource("1_sw5t1")

[node name="PlayerPath" type="Path3D" parent="."]

[node name="Sketchfab_model" type="Node3D" parent="."]
transform = Transform3D(0.25, 0, 0, 0, -1.09278e-08, 0.25, 0, -0.25, -1.09278e-08, 0, -0.000557914, 0.0143052)
[node name="PlayerPathFollow" type="PathFollow3D" parent="PlayerPath"]
use_model_front = true

[node name="Sculpt_fbx" type="Node3D" parent="Sketchfab_model"]
[node name="Player" type="Node3D" parent="PlayerPath/PlayerPathFollow"]

[node name="AnimationPlayer" type="AnimationPlayer" parent="PlayerPath/PlayerPathFollow/Player"]
root_node = NodePath("../../../..")
libraries = {
"": SubResource("AnimationLibrary_wwvw8")
}
autoplay = "flap"

[node name="model" type="Node3D" parent="PlayerPath/PlayerPathFollow/Player"]
transform = Transform3D(0.25, 0, 0, 0, -1.09279e-08, 0.25, 0, -0.25, -1.09278e-08, 0.0101153, -0.000557914, 0.0101153)

[node name="Sculpt_fbx" type="Node3D" parent="PlayerPath/PlayerPathFollow/Player/model"]
transform = Transform3D(0.01, 0, 0, 0, -4.37114e-10, -0.01, 0, 0.01, -4.37114e-10, 0, 0, 0)

[node name="Object_2" type="Node3D" parent="Sketchfab_model/Sculpt_fbx"]
[node name="Object_2" type="Node3D" parent="PlayerPath/PlayerPathFollow/Player/model/Sculpt_fbx"]
transform = Transform3D(0.1, 0, 0, 0, 0.1, 0, 0, 0, 0.1, 0, 0, 0)

[node name="RootNode" type="Node3D" parent="Sketchfab_model/Sculpt_fbx/Object_2"]
[node name="RootNode" type="Node3D" parent="PlayerPath/PlayerPathFollow/Player/model/Sculpt_fbx/Object_2"]

[node name="Extracted_Cube_000" type="Node3D" parent="Sketchfab_model/Sculpt_fbx/Object_2/RootNode"]
[node name="Extracted_Cube_000" type="Node3D" parent="PlayerPath/PlayerPathFollow/Player/model/Sculpt_fbx/Object_2/RootNode"]
transform = Transform3D(42.7767, 0, 0, 0, -5.09938e-06, 42.7767, 0, -42.7767, -5.09938e-06, 0, 0, 0)

[node name="Extracted_Cube_000_Material_0" type="MeshInstance3D" parent="Sketchfab_model/Sculpt_fbx/Object_2/RootNode/Extracted_Cube_000"]
[node name="Extracted_Cube_000_Material_0" type="MeshInstance3D" parent="PlayerPath/PlayerPathFollow/Player/model/Sculpt_fbx/Object_2/RootNode/Extracted_Cube_000"]
mesh = SubResource("ArrayMesh_gx2cy")
skeleton = NodePath("")

[node name="Extracted_Cube_002" type="Node3D" parent="Sketchfab_model/Sculpt_fbx/Object_2/RootNode"]
[node name="Extracted_Cube_002" type="Node3D" parent="PlayerPath/PlayerPathFollow/Player/model/Sculpt_fbx/Object_2/RootNode"]
transform = Transform3D(42.7767, 0, 0, 0, -5.09938e-06, 42.7767, 0, -42.7767, -5.09938e-06, 0, 0, 0)

[node name="Extracted_Cube_002_Material_002_0" type="MeshInstance3D" parent="Sketchfab_model/Sculpt_fbx/Object_2/RootNode/Extracted_Cube_002"]
[node name="Extracted_Cube_002_Material_002_0" type="MeshInstance3D" parent="PlayerPath/PlayerPathFollow/Player/model/Sculpt_fbx/Object_2/RootNode/Extracted_Cube_002"]
mesh = SubResource("ArrayMesh_ibjr5")
skeleton = NodePath("")

[node name="Plane" type="Node3D" parent="Sketchfab_model/Sculpt_fbx/Object_2/RootNode"]
[node name="Plane" type="Node3D" parent="PlayerPath/PlayerPathFollow/Player/model/Sculpt_fbx/Object_2/RootNode"]
transform = Transform3D(100, 0, 0, 0, -1.19209e-05, 100, 0, -100, -1.19209e-05, 0, 0, 0)

[node name="Plane_Material_002_0" type="MeshInstance3D" parent="Sketchfab_model/Sculpt_fbx/Object_2/RootNode/Plane"]
[node name="Plane_Material_002_0" type="MeshInstance3D" parent="PlayerPath/PlayerPathFollow/Player/model/Sculpt_fbx/Object_2/RootNode/Plane"]
mesh = SubResource("ArrayMesh_qio1f")
skeleton = NodePath("")

[node name="Cube_001" type="Node3D" parent="Sketchfab_model/Sculpt_fbx/Object_2/RootNode"]
[node name="Cube_001" type="Node3D" parent="PlayerPath/PlayerPathFollow/Player/model/Sculpt_fbx/Object_2/RootNode"]
transform = Transform3D(100, 0, 0, 0, -1.19209e-05, 100, 0, -100, -1.19209e-05, 0, 0, 0)

[node name="Cube_001_Material_003_0" type="MeshInstance3D" parent="Sketchfab_model/Sculpt_fbx/Object_2/RootNode/Cube_001"]
[node name="Cube_001_Material_003_0" type="MeshInstance3D" parent="PlayerPath/PlayerPathFollow/Player/model/Sculpt_fbx/Object_2/RootNode/Cube_001"]
mesh = SubResource("ArrayMesh_as1dt")
skeleton = NodePath("")

[node name="Sphere" type="Node3D" parent="Sketchfab_model/Sculpt_fbx/Object_2/RootNode"]
[node name="Sphere" type="Node3D" parent="PlayerPath/PlayerPathFollow/Player/model/Sculpt_fbx/Object_2/RootNode"]
transform = Transform3D(100, 0, 0, 0, -1.19209e-05, 100, 0, -100, -1.19209e-05, 0, 0, 0)

[node name="Sphere_Material_0" type="MeshInstance3D" parent="Sketchfab_model/Sculpt_fbx/Object_2/RootNode/Sphere"]
[node name="Sphere_Material_0" type="MeshInstance3D" parent="PlayerPath/PlayerPathFollow/Player/model/Sculpt_fbx/Object_2/RootNode/Sphere"]
mesh = SubResource("ArrayMesh_lcuyd")
skeleton = NodePath("")

[node name="Cube" type="Node3D" parent="Sketchfab_model/Sculpt_fbx/Object_2/RootNode"]
[node name="Cube" type="Node3D" parent="PlayerPath/PlayerPathFollow/Player/model/Sculpt_fbx/Object_2/RootNode"]
transform = Transform3D(42.7767, 0, 0, 0, -5.09938e-06, 42.7767, 0, -42.7767, -5.09938e-06, 0, 0, 0)

[node name="Cube_Material_001_0" type="MeshInstance3D" parent="Sketchfab_model/Sculpt_fbx/Object_2/RootNode/Cube"]
[node name="Cube_Material_001_0" type="MeshInstance3D" parent="PlayerPath/PlayerPathFollow/Player/model/Sculpt_fbx/Object_2/RootNode/Cube"]
mesh = SubResource("ArrayMesh_favib")
skeleton = NodePath("")

[node name="Cube_Material_001_02" type="MeshInstance3D" parent="Sketchfab_model/Sculpt_fbx/Object_2/RootNode/Cube"]
[node name="Cube_Material_001_02" type="MeshInstance3D" parent="PlayerPath/PlayerPathFollow/Player/model/Sculpt_fbx/Object_2/RootNode/Cube"]
mesh = SubResource("ArrayMesh_xhycm")
skeleton = NodePath("")

[node name="Cube_Material_001_03" type="MeshInstance3D" parent="Sketchfab_model/Sculpt_fbx/Object_2/RootNode/Cube"]
[node name="Cube_Material_001_03" type="MeshInstance3D" parent="PlayerPath/PlayerPathFollow/Player/model/Sculpt_fbx/Object_2/RootNode/Cube"]
mesh = SubResource("ArrayMesh_l58i1")
skeleton = NodePath("")

[node name="AnimationPlayer" type="AnimationPlayer" parent="."]
libraries = {
"": SubResource("AnimationLibrary_wwvw8")
}
autoplay = "flap"

[node name="OmniLight3D" type="OmniLight3D" parent="."]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0.0297138, -0.0345997)
[node name="OmniLight3D" type="OmniLight3D" parent="PlayerPath/PlayerPathFollow/Player"]
transform = Transform3D(0.707107, 0, 0.707107, 0, 1, 0, -0.707107, 0, 0.707107, 0.00900205, 0.0297138, -0.0956024)
light_color = Color(1, 1, 0.270588, 1)
light_energy = 2.0
omni_range = 1.17
omni_attenuation = 0.0

[node name="Area3D" type="Area3D" parent="PlayerPath/PlayerPathFollow/Player"]
transform = Transform3D(-8.9407e-08, 0, 1, 0, 1, 0, -1, 0, -8.9407e-08, 0, 0, 0)

[node name="CollisionShape3D" type="CollisionShape3D" parent="PlayerPath/PlayerPathFollow/Player/Area3D"]
shape = SubResource("SphereShape3D_kv6fh")

[node name="CSGPolygon3D" type="CSGPolygon3D" parent="."]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1, 0)
polygon = PackedVector2Array(0, 0, 0, 0.01, 0.01, 0.01, 0.01, 0)
mode = 2
path_node = NodePath("../PlayerPath")
path_interval_type = 0
path_interval = 0.03
path_simplify_angle = 0.0
path_rotation = 1
path_local = false
path_continuous_u = false
path_u_distance = 1.0
path_joined = false

[connection signal="input_event" from="PlayerPath/PlayerPathFollow/Player/Area3D" to="." method="_on_area_3d_input_event"]
Loading