Fluent Animation - Animate and queue almost anything without headaches

3044613--228205--large copy.png

A new fluent way to solve the decade old problem of queuing animations pretty easily. A simple example:

Animating a simple GameObject

Fluent.Animation.New()
.With(gameObject)
.MoveTo(new Vector3(0, 100, 0), 3f)
.RotateTo(Quaternion.Euler(0, 90, 30), 3f);

So what happened here? Well, the New() method created a new animation. The With method made sure that all next animations are applied to the given gameObject. The MoveTo and RotateTo functions animated the position and rotation of the gameObject, one after the other in 3 seconds.

The animations were queued. The rotation occurred after the movement, and that’s the beauty of procedural/fluent scripting.

Some of the features

  • Move, rotate, scale almost anything
  • Execute animations in parallel
  • Comes with 31 easing effects
  • Support for custom easing effects
  • Animate objects on a set of way points
  • Animate custom components
  • Animate custom fields/properties
  • Extend class to add more features
  • Customize animation update type
  • Loop, control, or jump to specific animation
  • Bezier, Spline and Linear waypoint paths
  • Comes with 5 free easy to learn demos

![3044613--228207--promo1 copy.png|785x474](upload://5eJ7aMXTBXOhnYKOdRBUo5KtL4m.png)

Animating custom components or properties

Fluent gives the ability to animate almost anything we like. Let’s try animating a customProperty of a CustomComponent.

Fluent.Animation.New()
.AnimateProperty(gameObject.GetComponent(), ‘customProperty’, 20f, 30f, 2f)

This will animate the customProperty from 20f to 30f in 2 seconds. This code also works on built-in components and properties. AnimatePropertyBy can be used if you don’t want to specify the starting value.

Animating an object on a path

Fluent comes with native support for animating objects on any path. Best part? The path could be either bezier, spline, or linear. Let me show you:

Online documentation and examples

So why was this created?

I was designing Extreme Air Combat game last year, and it was pretty difficult/verbose for me to create cut-scenes in which there are several moving objects one after another. And even more of a headache in which there are a few parallel animations involved. So I designed this thing to help me develop my game with less headches.

Thanks.
Let me know if you have any questions. I’ll be happy to answer.

2 Likes

Can animations happen at the same time also?
Example - scale, rotate and translate an object during the same 5 second period.

Yes, that is entirely possible. You can use parallel() method to create simple parallel animations or deeply complex nested parallel animations. Here’s the example.

Please let me know if you need more information.