Quantcast
Channel: Questions in topic: "weight"
Viewing all articles
Browse latest Browse all 136

What am I not getting about animation weight blending?

$
0
0
I've been having difficulty getting animation blending to work, so I've created a simple example. Can someone please explain what I'm doing wrong? Assume there are two animations on a character... "walk" and "zombie". (Why zombie? Why not zombie? It's Halloween.) Here is code: function Start () { animation["walk"].layer = 2; animation["walk"].weight = 1.0; animation["zombie"].layer = 3; animation["zombie"].weight = 0.5; animation.Play("walk"); animation.Play("zombie"); } By my understanding, this should play zombie at half weight and walk at half weight, but instead, it plays zombie at full weight. Why? EDIT: To further describe, let's say I change my code to this: function Start () { animation["walk"].layer = 2; animation["walk"].weight = 0.5; animation["zombie"].layer = 2; animation["zombie"].weight = 0.5; animation.Play("walk"); animation.Play("zombie"); } Even when I do that, it still plays the "zombie" animation at full weight instead of evenly distributing them. Does anyone know why that might be? EDIT #2: Changing the order of the animations makes a difference. If the "walk" animation is set to play after the "zombie" animation, the "walk" animation will play instead, at 100% weight. Still, this doesn't solve the overall problem of making them blend 50-50.

Viewing all articles
Browse latest Browse all 136

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>