Animate like a Programmer

preview_player
Показать описание
As a programmer, using the Unity animator can feel like you're losing some control over your game. We can manage our animation transitions entirely from code... Animation will feel as natural as your player controller script.

=========

Рекомендации по теме
Комментарии
Автор

I wasn't convinced until I saw I could bypass trying to line up the animator arrows in the grid

Norbingel
Автор

As a programmer learning game making in Unity I really like this. Now, if only there was a "How to create art/animations as a programmer"

spectralshark
Автор

I love how this video is under 2 minutes. Quick and straight to the point. Personally, I prefer the tree and have spent a great amount of time mastering it, but for quick prototypes and game jams this would be WAY faster to set up compared to messing with the tree.

lvlGhostlylvl
Автор

More tutorials need to be like this, immediately explaining what you want to show off without fluff. Amazing vid

freezeboy
Автор

I am working on animations literally this second. God sent you

kozinskiandrzej
Автор

I've only found your channel yesterday but already you are in my top 5, short and to the point. Keep up the good work!

spicyshotz
Автор

Finally found a channel with 0 BS, straight to the point, non-trivial dev advice.
Thank you!

ALX
Автор

Have been programming in Unity for over 6 years and always wrote my own animation system to avoid the issues addressed in this video.
I never heard of CrossFade, this would have solved everything I solved writing my own systems while keeping it connected to the tools Unity Provided. Thank you for showing this!
To return the favor, let me address the following thing I noticed about the video:

About the animation states. I categorize finite state machines into 3 categories:

Level 1: Tracking state by multiple booleans
Level 2: Tracking state by an enum
Level 3: Tracking state / having the logics of states in separate classes.

You were using a Level 1 Finite State Machine. I highly recommend going for a Level 2 or Level 3 Finite State Machine.

The nice thing about having it in separate classes is that you can do simple things such as:
* WalkingStateClass (holds logics of walking)
* FreezeStateClass (changes color when entered, and back when exited)

And to have the player freeze when hit by an object, you only have to:
CurrentState.Exit();
CurrentState = new FreezeStateClass();
CurrentState.Enter();

Because WalkingStateClass is no longer CurrentState, it no longer is being updated so no walking logics is available anymore. Keeping your behaviour simple and preventing complicated bugs.

darkfafi
Автор

Great video! I'm glad to see more devs promoting this approach. The mechanim is a clunky and unessessary system (for coders).

LostRelicGames
Автор

I'm relieved that I'm not alone to align horizontally the animator connection lines :D

gunhann
Автор

Bookmarking this for the future as i think ill never use the built in animator window ever again

TheDoomLordd
Автор

Im getting into unity with some friends. Im a professional programmer but this is my first real foray into game dev. My friends are all artists so I handle all the code. This channel is everything I want. I can figure out how to do nearly everything from the docs but never really know if Im following good practice. Most tutorials have been worthless because theyre not written for or by programmers. Loving you channel because its exactly what Ive been looking for

maxnibler
Автор

I switched to code-driven animation almost from day 1 of learning Unity after seeing LRG's tutorial on how to avoid Mekanim spiderweb madness. I barely even know how to use the Unity animator at this point. Your string hash to int trick is something I have not been doing though, until now! Thanks!

synchaoz
Автор

+1 for Animancer Pro, it makes working with animations programmatically so much easier. And, even solves some awful blendtree glitchiness by letting you disable foot IK on a per-animation basis. Technically, another option is directly implementing the somewhat abandoned Playables API which Animancer uses behind the scenes.

MarkRiverbank
Автор

"I read every single one of them."

WELL THEN, I HAVE SOMETHING TO SAY TO YOU.

that's a very well done video and I appreciate the time and effort that it must have taken to make it.

lDominicl
Автор

this looks a lot easier than working with unity animator, it would be great to see a full tutorial on this!

hmzaelmkd
Автор

So much information condensed into a video that's under 2 minutes. Beautiful Taro! And now it feel like a ton of my videos should be refactored to use this method of animating XD

iHeartGameDev
Автор

What an effective, quick video.
Humour, bit size and taught well.

eliphillips
Автор

You can take this a step further by using Scriptable Objects to create states and then having a State Machine Monobehaviour. This way you can link up states to different animations which is particularly handy for games with multiple playable characters and generally works better as a more modular methodology than the firewall

crzyhand
Автор

This is marvelous <3

I want to make an example of 3D character animators and wanted something like this to help explain. I'll definitely save and reference your video when working on my project!

NickMaltbie