Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Vector3 idleWeights = new Vector3(0,1,0);
- if (energy > 0.5) {
- idleWeights = Vector3.Lerp(idleWeights, new Vector3(0,0,1), (energy-0.5f)*2 );
- } else {
- idleWeights = Vector3.Lerp(idleWeights, new Vector3(1,0,0), energy*2 );
- }
- animation["lowIdle"].weight = idleWeights.x;
- animation["normalIdle"].weight = idleWeights.y;
- animation["highIdle"].weight = idleWeights.z;
Add Comment
Please, Sign In to add comment