Skip to content

Tween behavior

The Tween (from inbetween) behavior animates objects properties over time:

  • Position (X, Y, Z for 3D objects)
  • Angle (and rotation X/Y for 3D objects)
  • Scale (X, Y, or both)
  • Size (width, height, depth for 3D objects)
  • Opacity
  • Color (RGB or HSL modes)
  • Text character size
  • Effect properties (numeric or color parameters)
  • Variables (object or scene variables)
  • Custom values (accessible via expressions)

Each tween is identified by a unique name (identifier). Starting a tween with an existing identifier will restart that tween from the current value.

Note

easings.net is an interactive catalog of all easing functions (speed shapes) that can be used by the tween behavior.

Play tweens simultaneously

Tweens can be played simultaneously simply by adding actions next to each other.

Chain tweens

Tweens can be delayed to be played one after the other using the wait action.

The same result can be achieved using the tween finished playing condition. This method should be used when the object may not do the second tween under some conditions.

Loop tweens

Tweens can be looped by starting back the first tween at the end of a chain.

Some extensions also have built-in looping:

Scale from center

When tweening an object's scale, you can choose whether to scale from the object's origin (top-left corner) or from its center point. Scaling from the center keeps the object's center position fixed during the animation, which is useful for UI elements or centered objects. Scaling from the origin maintains the top-left position, which can be useful for anchored elements.

Color tweening modes

Color tweens support two interpolation modes:

  • RGB mode: Interpolates directly between red, green, and blue values. This creates a linear transition through the RGB color space.
  • HSL mode (default): Converts colors to Hue, Saturation, and Lightness, then interpolates. This often produces more visually pleasing transitions, especially when transitioning between different hues (e.g., red to blue will go through purple, not brown).

For fine control, use the "Tween object color in HSL" action to specify target hue, saturation, and lightness values independently.

Exponential interpolation

Scale tweens use exponential interpolation by default, which means they interpolate through multiplication rather than addition. This produces more natural-looking scale animations. For example, scaling from 0.5 to 2.0 will pass through 1.0 at the midpoint.

Custom value tweens can also use exponential interpolation by enabling the "Exponential interpolation" parameter, which is useful for tweening zoom levels or other multiplicative values.

Effect properties

Tweens can animate effect parameters on objects:

  • Numeric properties: Interpolate number values like blur radius or pixel size
  • Color properties: Interpolate color values using HSL color space

These allow you to create smooth visual transitions for effects applied to objects.

Tween 3D objects

The 3D tween extension has additional actions dedicated to 3D.

Examples

Note

See it in action! 🎮

Open these examples online.

Tween Test

Open example in GDevelop

Tween Animations

Open example in GDevelop

Pairs

Open example in GDevelop

Reference

All actions, conditions and expressions are listed in the tween behavior reference page.