Skip to content

Commit 36d372f

Browse files
committed
Add default for alpha
1 parent e95f870 commit 36d372f

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

crates/bevy_animation_graph_builtin_nodes/src/blend_node.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,9 @@ impl NodeLike for BlendNode {
106106
Self::IN_EVENT_A,
107107
Self::IN_TIME_B,
108108
Self::IN_POSE_B,
109-
ctx.data_back(Self::FACTOR)?.as_f32()?,
109+
ctx.data_back(Self::FACTOR)
110+
.unwrap_or(DataValue::F32(1.))
111+
.as_f32()?,
110112
),
111113
BlendPrimary::HighestWeight => {
112114
if ctx.data_back(Self::FACTOR)?.as_f32()? <= 0.5 {

0 commit comments

Comments
 (0)