Echo
Today I want to present a new concept FlowEnt has introduced. There is one collection animation in South Park: Phone Destroyer, that I really like and I wanted to create a tween motion for it, but just couldn't. I wanted to use a particle system and it just doesn't work the way you need it. In order to properly implement this, you need a different type of animation. A tween that goes from 0 to 1 won't do it. Because f this a new concept was born: Echo!
The idea of an Echo is very simple: every frame does something, based on a delta time until it times out or a condition to stop it is met. It's basically something you would do on an update method, but instead of creating a script, you can just start an Echo and stop it when you want. It provides almost all options that a Tween has, meaning you can choose the type of update(Normal, Late, Fixed) set a time scale, or other options. It also supports all the callbacks a Tween does, this is really helpful at times.
I managed to create a few motions, which I going to talk about in the weekly motions posts, but I do want to show some examples of the power of these Echoes. The first example, and one of my favourite ones, is, how easy it is to create a movable character. Here's the code for it:
CharacterController.Echo()
.MoveByInput()
.RotateByInput(Camera.transform)
.JumpByInput(20)
.Start();
That's it. That's all it takes. Isn't it amazing? And you can disable the input(but pausing the Echo) or apply some time distortion...just to the input. Here's a rigid body version of it:
CharacterRigidBody.Echo()
.MoveByInput()
.RotateByInput(Camera.transform)
.JumpByInput(20)
.Start();
How about something else? You have a character that should follow another character. Say no more:
follower.Echo()
.MoveTo(followee, 5, SpeedType.Elastic)
.LookAt(followee)
.Start();
Pretty neat, right? There are many other motions to come for this new type of animation, and it'll be epic. Keep an eye out for weekly motions and you might find one that'll be needed in your project!
Comments
Post a Comment