Needle Engine

Changes between version 3.28.6-beta and 3.28.7-beta
Files changed (1) hide show
  1. src/engine-components/AnimatorController.ts +3 -3
src/engine-components/AnimatorController.ts CHANGED
@@ -562,12 +562,12 @@
562
562
  private evaluateCondition(cond: Condition): boolean {
563
563
  const param = this.model.parameters.find(p => p.name === cond.parameter);
564
564
  if (!param) return false;
565
- // console.log(param.name, param.value);
565
+ // console.log(param.name + "=" + param.value, AnimatorConditionMode[cond.mode], cond.threshold);
566
566
  switch (cond.mode) {
567
567
  case AnimatorConditionMode.If:
568
- return param.value === true;
568
+ return param.value === cond.threshold;
569
569
  case AnimatorConditionMode.IfNot:
570
- return param.value === false;
570
+ return param.value === cond.threshold;
571
571
  case AnimatorConditionMode.Greater:
572
572
  return param.value as number > cond.threshold;
573
573
  case AnimatorConditionMode.Less: