Fix rocks colour villagers

This commit is contained in:
Spencer Killen 2023-08-19 21:21:54 -06:00
parent c4a3b3bdc0
commit a5476d4ddd
Signed by: sjkillen
GPG Key ID: F307025B65C860BA
5 changed files with 50 additions and 8 deletions

View File

@ -28,5 +28,17 @@ animation/fps=30
animation/trimming=false
animation/remove_immutable_tracks=true
import_script/path=""
_subresources={}
_subresources={
"materials": {
"50": {
"use_external/enabled": true,
"use_external/path": "res://Textures/rock.tres"
}
},
"nodes": {
"PATH:root/node_id4": {
"generate/physics": true
}
}
}
gltf/embedded_image_handling=1

View File

@ -28,5 +28,17 @@ animation/fps=30
animation/trimming=false
animation/remove_immutable_tracks=true
import_script/path=""
_subresources={}
_subresources={
"materials": {
"50": {
"use_external/enabled": true,
"use_external/path": "res://Textures/rock.tres"
}
},
"nodes": {
"PATH:root/node_id4": {
"generate/physics": true
}
}
}
gltf/embedded_image_handling=1

View File

@ -28,5 +28,17 @@ animation/fps=30
animation/trimming=false
animation/remove_immutable_tracks=true
import_script/path=""
_subresources={}
_subresources={
"materials": {
"50": {
"use_external/enabled": true,
"use_external/path": "res://Textures/rock.tres"
}
},
"nodes": {
"PATH:root/node_id4": {
"generate/physics": true
}
}
}
gltf/embedded_image_handling=1

View File

@ -1,7 +1,12 @@
extends Node3D
@onready var animation_state: AnimationNodeStateMachinePlayback = $AnimationTree.get("parameters/playback")
@export var colors: Array[Color]
func _ready():
var color = colors[randi() % colors.size()]
$Armature/Skeleton3D/Slime.get_active_material(3).albedo_color = color
func walk():
animation_state.travel("Walk")

View File

@ -27,15 +27,16 @@ transitions = ["Walk", "Idle", SubResource("AnimationNodeStateMachineTransition_
[node name="slime" instance=ExtResource("1_jttw0")]
script = ExtResource("2_xo27e")
colors = Array[Color]([Color(0, 0.113725, 0.905882, 1), Color(0.592157, 0, 0.243137, 1), Color(0.513726, 0.360784, 0, 1), Color(0, 0.470588, 0.32549, 1), Color(0.423529, 0, 0.54902, 1)])
[node name="Skeleton3D" parent="Armature" index="0"]
bones/1/position = Vector3(0, 0.419783, 0)
bones/1/position = Vector3(0, 0.529453, 0)
bones/2/rotation = Quaternion(-0.0627444, 0.00212883, -0.213248, 0.974979)
bones/3/rotation = Quaternion(0.100834, -0.698956, 0.0125015, 0.707911)
bones/7/rotation = Quaternion(-0.259966, 2.31658e-09, 2.75962e-09, 0.965618)
bones/8/rotation = Quaternion(0.184716, -8.96583e-10, -4.81081e-10, 0.982792)
bones/10/rotation = Quaternion(0.255235, -5.60434e-08, -5.76742e-08, 0.966879)
bones/11/rotation = Quaternion(-0.18748, 7.5629e-08, 2.75785e-08, 0.982268)
bones/7/rotation = Quaternion(-0.1315, 2.65747e-09, 2.43309e-09, 0.991316)
bones/8/rotation = Quaternion(0.585182, -1.01606e-09, -5.40585e-11, 0.810902)
bones/10/rotation = Quaternion(0.0879173, -4.54741e-08, -6.63271e-08, 0.996128)
bones/11/rotation = Quaternion(-0.607325, 5.52851e-08, 5.85139e-08, 0.794453)
[node name="AnimationTree" type="AnimationTree" parent="." index="2"]
tree_root = SubResource("AnimationNodeStateMachine_prt7l")