generated from krampus/template-godot4
Listener idle animation
All checks were successful
linting & formatting / build (push) Successful in 34s
All checks were successful
linting & formatting / build (push) Successful in 34s
This commit is contained in:
parent
772489596b
commit
fb4b81d78c
Binary file not shown.
Binary file not shown.
BIN
asset_dev/grunk_nodes/listener/listener2.blend
Normal file
BIN
asset_dev/grunk_nodes/listener/listener2.blend
Normal file
Binary file not shown.
BIN
assets/grunk/listener/animations/RESET.res
(Stored with Git LFS)
Normal file
BIN
assets/grunk/listener/animations/RESET.res
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
assets/grunk/listener/animations/close.res
(Stored with Git LFS)
Normal file
BIN
assets/grunk/listener/animations/close.res
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
assets/grunk/listener/animations/idle.res
(Stored with Git LFS)
Normal file
BIN
assets/grunk/listener/animations/idle.res
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
assets/grunk/listener/animations/open.res
(Stored with Git LFS)
Normal file
BIN
assets/grunk/listener/animations/open.res
(Stored with Git LFS)
Normal file
Binary file not shown.
Binary file not shown.
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@ -378,7 +378,7 @@ surface_material_override/0 = SubResource("ShaderMaterial_yuift")
|
|||||||
[node name="PhysicalBoneSimulator3D" type="PhysicalBoneSimulator3D" parent="ListenerModel/Armature/Skeleton3D" index="6"]
|
[node name="PhysicalBoneSimulator3D" type="PhysicalBoneSimulator3D" parent="ListenerModel/Armature/Skeleton3D" index="6"]
|
||||||
|
|
||||||
[node name="PhysicalBone3D" type="PhysicalBone3D" parent="ListenerModel/Armature/Skeleton3D/PhysicalBoneSimulator3D"]
|
[node name="PhysicalBone3D" type="PhysicalBone3D" parent="ListenerModel/Armature/Skeleton3D/PhysicalBoneSimulator3D"]
|
||||||
transform = Transform3D(0.323526, 1.18154e-06, 1.20741, -1.06742e-08, 1.25, -1.22036e-06, -1.20741, 3.05545e-07, 0.323526, -4.82718e-06, 0.800007, -1.2209e-06)
|
transform = Transform3D(0.323526, 1.18154e-06, 1.20741, -1.06742e-08, 1.25, -1.22036e-06, -1.20741, 3.05545e-07, 0.323526, -4.82717e-06, 0.800007, -1.2209e-06)
|
||||||
joint_offset = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 5.43995e-08, -5.86509e-06, 3.98532e-06)
|
joint_offset = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 5.43995e-08, -5.86509e-06, 3.98532e-06)
|
||||||
body_offset = Transform3D(1.25, 1.11823e-08, -2.86102e-06, -1.11851e-08, 1.25, -1.23028e-06, 2.86102e-06, 1.23028e-06, 1.25, -6.79879e-08, 7.33137e-06, -4.98164e-06)
|
body_offset = Transform3D(1.25, 1.11823e-08, -2.86102e-06, -1.11851e-08, 1.25, -1.23028e-06, 2.86102e-06, 1.23028e-06, 1.25, -6.79879e-08, 7.33137e-06, -4.98164e-06)
|
||||||
bone_name = "Stem5"
|
bone_name = "Stem5"
|
||||||
|
@ -13,7 +13,7 @@ var _ik_tween: Tween
|
|||||||
@onready var target_target: Marker3D = %TargetTarget
|
@onready var target_target: Marker3D = %TargetTarget
|
||||||
|
|
||||||
@onready var ik_target: Marker3D = %IKTarget
|
@onready var ik_target: Marker3D = %IKTarget
|
||||||
@onready var animation_player: AnimationPlayer = $AnimationPlayer
|
@onready var leaf_animation: AnimationPlayer = %LeafAnimation
|
||||||
|
|
||||||
@onready var stem_ik_1: LookAtModifier3D = %StemIK1
|
@onready var stem_ik_1: LookAtModifier3D = %StemIK1
|
||||||
@onready var stem_ik_2: LookAtModifier3D = %StemIK2
|
@onready var stem_ik_2: LookAtModifier3D = %StemIK2
|
||||||
@ -34,10 +34,10 @@ func lock_target(target: Vector3) -> void:
|
|||||||
|
|
||||||
if not _open:
|
if not _open:
|
||||||
_open = true
|
_open = true
|
||||||
animation_player.play("open", 0.2)
|
leaf_animation.play("open", 0.2)
|
||||||
(
|
(
|
||||||
_get_ik_tween()
|
_get_ik_tween()
|
||||||
. tween_property(self, "ik_influence", 1, animation_player.current_animation_length)
|
. tween_property(self, "ik_influence", 1, leaf_animation.current_animation_length)
|
||||||
. set_ease(Tween.EASE_IN_OUT)
|
. set_ease(Tween.EASE_IN_OUT)
|
||||||
. set_trans(Tween.TRANS_CUBIC)
|
. set_trans(Tween.TRANS_CUBIC)
|
||||||
)
|
)
|
||||||
@ -45,10 +45,10 @@ func lock_target(target: Vector3) -> void:
|
|||||||
|
|
||||||
func release_target() -> void:
|
func release_target() -> void:
|
||||||
if _open:
|
if _open:
|
||||||
animation_player.play("close", 0.2)
|
leaf_animation.play("close", 0.2)
|
||||||
(
|
(
|
||||||
_get_ik_tween()
|
_get_ik_tween()
|
||||||
. tween_property(self, "ik_influence", 0, animation_player.current_animation_length)
|
. tween_property(self, "ik_influence", 0, leaf_animation.current_animation_length)
|
||||||
. set_ease(Tween.EASE_IN_OUT)
|
. set_ease(Tween.EASE_IN_OUT)
|
||||||
. set_trans(Tween.TRANS_CUBIC)
|
. set_trans(Tween.TRANS_CUBIC)
|
||||||
)
|
)
|
||||||
|
@ -1,12 +1,72 @@
|
|||||||
[gd_scene load_steps=4 format=3 uid="uid://c2c0ooj1re3dk"]
|
[gd_scene load_steps=10 format=3 uid="uid://c2c0ooj1re3dk"]
|
||||||
|
|
||||||
[ext_resource type="PackedScene" uid="uid://coucghe370fff" path="res://assets/grunk/listener/listener.gltf" id="1_lgdkx"]
|
[ext_resource type="PackedScene" uid="uid://coucghe370fff" path="res://assets/grunk/listener/listener.gltf" id="1_lgdkx"]
|
||||||
[ext_resource type="Script" uid="uid://co4gkdwyhdbmc" path="res://src/world/mechanics/listener/listener_model.gd" id="2_yh3g4"]
|
[ext_resource type="Script" uid="uid://co4gkdwyhdbmc" path="res://src/world/mechanics/listener/listener_model.gd" id="2_yh3g4"]
|
||||||
[ext_resource type="Material" uid="uid://bmab6i16v748m" path="res://assets/materials/grunk_jittery.material" id="3_xijsm"]
|
[ext_resource type="Material" uid="uid://bmab6i16v748m" path="res://assets/materials/grunk_jittery.material" id="3_xijsm"]
|
||||||
|
[ext_resource type="Animation" uid="uid://dihyn82xf67ou" path="res://assets/grunk/listener/animations/RESET.res" id="4_y4jww"]
|
||||||
|
[ext_resource type="Animation" uid="uid://c236lo5xytxaa" path="res://assets/grunk/listener/animations/idle.res" id="5_3vskp"]
|
||||||
|
[ext_resource type="Animation" uid="uid://bujor2i5icw8c" path="res://assets/grunk/listener/animations/close.res" id="6_ghw47"]
|
||||||
|
[ext_resource type="Animation" uid="uid://c4juq6vxnnxbe" path="res://assets/grunk/listener/animations/open.res" id="7_c25ju"]
|
||||||
|
|
||||||
|
[sub_resource type="AnimationLibrary" id="AnimationLibrary_ghw47"]
|
||||||
|
_data = {
|
||||||
|
&"RESET": ExtResource("4_y4jww"),
|
||||||
|
&"idle": ExtResource("5_3vskp")
|
||||||
|
}
|
||||||
|
|
||||||
|
[sub_resource type="AnimationLibrary" id="AnimationLibrary_5lsre"]
|
||||||
|
_data = {
|
||||||
|
&"RESET": ExtResource("4_y4jww"),
|
||||||
|
&"close": ExtResource("6_ghw47"),
|
||||||
|
&"open": ExtResource("7_c25ju")
|
||||||
|
}
|
||||||
|
|
||||||
[node name="ListenerModel" instance=ExtResource("1_lgdkx")]
|
[node name="ListenerModel" instance=ExtResource("1_lgdkx")]
|
||||||
script = ExtResource("2_yh3g4")
|
script = ExtResource("2_yh3g4")
|
||||||
|
|
||||||
|
[node name="Skeleton3D" parent="Armature" index="0"]
|
||||||
|
bones/0/rotation = Quaternion(-1.51225e-09, 0.130526, 4.05207e-10, 0.991445)
|
||||||
|
bones/1/rotation = Quaternion(9.2869e-09, 0.130526, -8.10413e-10, 0.991445)
|
||||||
|
bones/2/rotation = Quaternion(-9.1802e-09, 0.130526, -8.10414e-10, 0.991445)
|
||||||
|
bones/3/rotation = Quaternion(6.20905e-09, 0.130526, -4.05206e-10, 0.991445)
|
||||||
|
bones/4/rotation = Quaternion(-8.49624e-09, 0.130526, -9.00455e-11, 0.991445)
|
||||||
|
bones/5/rotation = Quaternion(0.54585, 0.487268, 0.374478, -0.569548)
|
||||||
|
bones/6/rotation = Quaternion(0.308353, 2.1709e-08, 1.30586e-08, 0.951272)
|
||||||
|
bones/7/rotation = Quaternion(0.334237, -0.119529, -0.0427788, 0.9339)
|
||||||
|
bones/8/rotation = Quaternion(0.247978, -2.40337e-10, -3.8454e-09, 0.968766)
|
||||||
|
bones/9/rotation = Quaternion(0.148338, 2.82522e-09, -5.65045e-09, 0.988937)
|
||||||
|
bones/10/rotation = Quaternion(0.237284, 7.34911e-07, -1.96017e-07, 0.97144)
|
||||||
|
bones/11/rotation = Quaternion(0.285481, 0.70676, 0.597232, -0.249609)
|
||||||
|
bones/12/rotation = Quaternion(0.308353, 6.75348e-08, -4.55922e-08, 0.951272)
|
||||||
|
bones/13/rotation = Quaternion(0.334237, -0.119529, -0.0427787, 0.9339)
|
||||||
|
bones/14/rotation = Quaternion(0.247978, 6.91065e-10, -2.79256e-08, 0.968766)
|
||||||
|
bones/15/rotation = Quaternion(0.148338, 7.66861e-08, 9.51493e-08, 0.988937)
|
||||||
|
bones/16/rotation = Quaternion(0.237284, 1.57873e-06, -4.4533e-07, 0.97144)
|
||||||
|
bones/17/rotation = Quaternion(-0.0513825, 0.736877, 0.659958, 0.137212)
|
||||||
|
bones/18/rotation = Quaternion(0.308353, -1.71875e-07, -7.09416e-08, 0.951272)
|
||||||
|
bones/19/rotation = Quaternion(0.334237, -0.119529, -0.0427786, 0.9339)
|
||||||
|
bones/20/rotation = Quaternion(0.247978, -5.53974e-08, -1.69864e-07, 0.968766)
|
||||||
|
bones/21/rotation = Quaternion(0.148338, 4.98196e-08, 2.63702e-07, 0.988937)
|
||||||
|
bones/22/rotation = Quaternion(0.237284, 2.44019e-06, -9.05055e-07, 0.97144)
|
||||||
|
bones/23/rotation = Quaternion(-0.374478, 0.569548, 0.545849, 0.487268)
|
||||||
|
bones/24/rotation = Quaternion(0.308353, -3.56631e-08, -1.14694e-08, 0.951272)
|
||||||
|
bones/25/rotation = Quaternion(0.334237, -0.119529, -0.0427786, 0.9339)
|
||||||
|
bones/26/rotation = Quaternion(0.247978, -6.25756e-08, -2.50967e-07, 0.968766)
|
||||||
|
bones/27/rotation = Quaternion(0.148338, 2.83936e-08, 1.69831e-07, 0.988937)
|
||||||
|
bones/28/rotation = Quaternion(0.237284, 3.38177e-06, -1.02259e-06, 0.97144)
|
||||||
|
bones/29/rotation = Quaternion(-0.597232, 0.249609, 0.285481, 0.70676)
|
||||||
|
bones/30/rotation = Quaternion(0.308353, 2.31089e-09, 1.50606e-08, 0.951272)
|
||||||
|
bones/31/rotation = Quaternion(0.334237, -0.119529, -0.0427785, 0.9339)
|
||||||
|
bones/32/rotation = Quaternion(0.247978, -3.1123e-08, -2.32956e-07, 0.968766)
|
||||||
|
bones/33/rotation = Quaternion(0.148338, 5.29717e-08, 2.76084e-07, 0.988937)
|
||||||
|
bones/34/rotation = Quaternion(0.237284, 4.29037e-06, -1.26097e-06, 0.97144)
|
||||||
|
bones/35/rotation = Quaternion(-0.659958, -0.137212, -0.0513825, 0.736877)
|
||||||
|
bones/36/rotation = Quaternion(0.308353, 3.35578e-09, 4.35599e-09, 0.951272)
|
||||||
|
bones/37/rotation = Quaternion(0.334237, -0.119529, -0.0427785, 0.9339)
|
||||||
|
bones/38/rotation = Quaternion(0.247978, -1.26717e-07, -3.12779e-07, 0.968766)
|
||||||
|
bones/39/rotation = Quaternion(0.148338, 2.72959e-08, 3.46469e-07, 0.988937)
|
||||||
|
bones/40/rotation = Quaternion(0.237284, 5.07144e-06, -1.68211e-06, 0.97144)
|
||||||
|
|
||||||
[node name="Listener" parent="Armature/Skeleton3D" index="0"]
|
[node name="Listener" parent="Armature/Skeleton3D" index="0"]
|
||||||
surface_material_override/0 = ExtResource("3_xijsm")
|
surface_material_override/0 = ExtResource("3_xijsm")
|
||||||
|
|
||||||
@ -100,9 +160,20 @@ primary_damp_threshold = 0.0
|
|||||||
secondary_limit_angle = 1.5708
|
secondary_limit_angle = 1.5708
|
||||||
secondary_damp_threshold = 0.0
|
secondary_damp_threshold = 0.0
|
||||||
|
|
||||||
[node name="IKTarget" type="Marker3D" parent="." index="2"]
|
[node name="IKTarget" type="Marker3D" parent="." index="1"]
|
||||||
unique_name_in_owner = true
|
unique_name_in_owner = true
|
||||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0)
|
|
||||||
|
|
||||||
[node name="TargetTarget" type="Marker3D" parent="." index="3"]
|
[node name="TargetTarget" type="Marker3D" parent="." index="2"]
|
||||||
unique_name_in_owner = true
|
unique_name_in_owner = true
|
||||||
|
|
||||||
|
[node name="IdleAnimation" type="AnimationPlayer" parent="." index="3"]
|
||||||
|
libraries = {
|
||||||
|
&"": SubResource("AnimationLibrary_ghw47")
|
||||||
|
}
|
||||||
|
autoplay = "idle"
|
||||||
|
|
||||||
|
[node name="LeafAnimation" type="AnimationPlayer" parent="." index="4"]
|
||||||
|
unique_name_in_owner = true
|
||||||
|
libraries = {
|
||||||
|
&"": SubResource("AnimationLibrary_5lsre")
|
||||||
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user