unity tween engine by edi

20
@agatestudio Unity Tween Engine Edi Knight Agate Studio

Upload: agate-studio

Post on 14-May-2015

172 views

Category:

Education


0 download

TRANSCRIPT

Page 1: Unity Tween Engine by Edi

@agatestudio

Unity Tween Engine

Edi

Knight

Agate Studio

Page 2: Unity Tween Engine by Edi

@agatestudio@agatestudio@agatestudio

Index

• Definition

• Why?

• When to use

• More

• Tween Engines in Unity

• Samples & Demos

Page 3: Unity Tween Engine by Edi

@agatestudio@agatestudio@agatestudio

Definition

Page 4: Unity Tween Engine by Edi

@agatestudio@agatestudio@agatestudio

Definition

• A tween is basically an interpolation between two values that runs for a given amount of time.

• Tween Engine does a lot more than that, and handles the life-cycles and the update mechanisms of the interpolations for you. Moreover, it enables the interpolation of attributes of some objects.

Page 5: Unity Tween Engine by Edi

@agatestudio@agatestudio@agatestudio

Why use tweening (engine)?

• Dynamic.

• You can modify your transitions, timing, values, easings, and other attributes with only lines of code, rather than telling your artist/animator to animate/fixate the object. This will faster the production time, too.

• Some tweening engine have motion path, too!

Page 6: Unity Tween Engine by Edi

@agatestudio@agatestudio@agatestudio

When to use tweening (engine)?

• Simple animations, like movement,

• Rotation,

X

Page 7: Unity Tween Engine by Edi

@agatestudio@agatestudio@agatestudio

When to use tweening (engine)?

• Color/alpha transformation,

• Scaling,

Page 8: Unity Tween Engine by Edi

@agatestudio@agatestudio@agatestudio

When to use tweening (engine)?

• Or all of them combined!

Page 9: Unity Tween Engine by Edi

@agatestudio@agatestudio@agatestudio

More on tweening (engine)

• Time : Time needed to complete a tween animation

• Delay : Time needed to start a tween animation

• Easing : Some equation to control the rate of tweening

Page 10: Unity Tween Engine by Edi

@agatestudio@agatestudio@agatestudio

More on tweening (engine)

Example : Without easing

Page 11: Unity Tween Engine by Edi

@agatestudio@agatestudio@agatestudio

More on tweening (engine)

Example : With easing (double the return value when time > 3s)

Page 12: Unity Tween Engine by Edi

@agatestudio@agatestudio@agatestudio

More on tweening (engine)

Page 13: Unity Tween Engine by Edi

@agatestudio@agatestudio@agatestudio

Unity Tween Engines

• iTween

• HOTween

• LeanTween

• etc

Page 14: Unity Tween Engine by Edi

@agatestudio@agatestudio@agatestudio

iTween

• Free

• Complete documentation and samples

• Easy to use

• Tween GameObject 2D-ly and 3D-ly, GUI, even sound!

Page 15: Unity Tween Engine by Edi

@agatestudio@agatestudio@agatestudio

iTween

• Movement

Page 16: Unity Tween Engine by Edi

@agatestudio@agatestudio@agatestudio

iTween

• Rotation

• Color

Page 17: Unity Tween Engine by Edi

@agatestudio@agatestudio@agatestudio

iTween

More on “Samples & Demos” later

Page 18: Unity Tween Engine by Edi

@agatestudio@agatestudio@agatestudio

HOTween & LeanTween

• More or Less like iTween

• Some says that iTween is heavier in mobile (ios/android)

• HOTween & LeanTween has optimizer/optimized version for mobile

Page 19: Unity Tween Engine by Edi

@agatestudio@agatestudio@agatestudio

Samples and Demos

• iTween http://itween.pixelplacement.com/examples.php

• More on Unity3d

Page 20: Unity Tween Engine by Edi

Thank you!