[SOLVED] When to use blend trees?

Hello, I just reached the tutorial on blend trees. I’ve been working in Unity for just about a year now and I’ve never heard of them before and they seem awesome!

My question: Are blend trees used only in special circumstances or are they used quite often? Can I use blend tress in 2D projects or do they only work in 3D?

Thanks!

Blend trees work by blending anmation parameters from two sources… while they might technically “work” in a 2d game, they’re not going to do things like morph sprites.

Within 3d games, I generally only use them when dealing with movement, though there are some tricks that a Blend Tree might come in handy… you might have 3 different attack animations, and rather than having three “attack” states, you could SetFloat a parameter to a whole value to select between the three animations.

2 Likes

Just want to add a little more to Brian’s response.

Blend Trees can be used for all sorts of things, I highly recommend you keep them at the top of your head because they are really handy. Imagine this: You have a platform that you want to rotate, but you want it to stop at a certain point, the code for that might be a little convoluted, but if you use a blend tree you can have full control over that without having to write so much code. What you can use it for truly depends on your imagination.

In a 2D environment, even tho the sprites won’t get morphed, you can use it to create really professional-looking animations, a falling animation with several states that are controlled via a Blend Tree can look amazing, also, for top-down view games, similar to A Link to the Past, can be used to better control the character walking animation.

I ignored Blend Trees for quite a while, but now it has become one of my most used tools due to its versatility.

3 Likes

Awesome, thanks very much for the reply! I’ll keep those tips in mind :slight_smile:

Ahh okay gotcha! Thank you very much! :slight_smile:

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.

Privacy & Terms