A downloadable tool for Windows

Download NowName your own price

Behavior_2D_Overlay_Animation – CopperCube Extension

behavior_2D_Overlay_Animation is a lightweight CopperCube plugin designed to bring subtle motion to your 2D overlays or 3D meshes — perfect for UI indicators, buttons, or any visual element that needs to gently catch the player's eye.

This behavior creates a smooth ping-pong bounce effect, either vertically or horizontally, with customizable easing and timing. Whether you're building a polished menu or a dynamic HUD, this plugin helps add life and clarity to your interface.

Behavior: 2D / 3D Overlay & Mesh Loop Animation – Parameter List

Below is the full explanation of all parameters included in the latest version of your behavior.

Trigger System

Triggering_By_Variable (bool — default: false)

If true, the animation only runs when a CopperCube variable reaches a “true” value
(1, "1", true, "true").

If false, the animation plays continuously without any trigger control.

Trigger_Variable (string)

Name of the CopperCube variable used as the trigger.
• The animation plays while the variable is ON (true/1).
• When the variable is OFF (false/0), animation stops.

Used only if Triggering_By_Variable = true.

Reset_On_Trigger_Off (bool — default: true)

If true, when the trigger turns OFF, the node instantly returns to its initial original position
(the position captured when the behavior first activated).

If false, the node stays where it last was when the trigger stopped.

Target Selection

Overlay_Or_Mesh (bool — default: true)

Defines the type of animation target:

  • true → Animate an Overlay 2D (pixel-based movement)

  • false → Animate a 3D Mesh (movement on X/Y/Z world axes)

Overlay_Node (scenenode)

Overlay element to animate.
Used only if Overlay_Or_Mesh = true.

Accepted properties used internally:
Pos X (pixels)
Pos Y (pixels)

Mesh_Node (scenenode)

3D mesh to animate.
Used only if Overlay_Or_Mesh = false.

Internal properties used:
Position.x
Position.y
Position.z

Mesh_Axis (string — default: "x")

When moving a mesh, choose which world axis is animated:

  • "x" or "X" → Horizontal

  • "y" or "Y" → Vertical

  • "z" or "Z" → Depth

Works only with Overlay_Or_Mesh = false.

Animation Settings

Pixel_Lenght_Movement (int — default: 20)

Amount of movement (amplitude) in pixels (for overlays) or units (for meshes).
This is the maximum offset from the starting position.

Cycle_Duration (int — default: 2000)

Duration of a full animation cycle in milliseconds.

Example:
• 2000ms = 2 seconds = up → center → down → center

Ease_Type (string — default: "sine")

Choose the motion curve:

  • "sine" → smooth, natural acceleration and deceleration

  • "linear" → constant speed, triangular motion

  • "quad" → quadratic ease (soft peaks, faster center)

  • "cubic" → strongest ease, highly curved motion

Works for both Overlay and Mesh animation.

Direction Controls (Overlay Only)

UpDown_Or_LeftRight (bool — default: true)

Defines the motion direction for overlays (ignored for meshes):

  • true → Vertical movement (Up/Down on Y pixel axis)

  • false → Horizontal movement (Left/Right on X pixel axis)

Invert_Direction (bool — default: false)

Reverses the animation’s initial direction:

  • For vertical overlays: default is Up → Down

  • For horizontal overlays: default is Left → Right

  • For meshes: reverses movement in positive/negative direction of the chosen axis

Direction Notes for Invert_Direction parameter:

  • Up/Down: false = bottom→top (default), true = top→bottom
  • Left/Right: false = left→right (default), true = right→left

EXCLUSIVE PARAMETERS — Action Only (Not in Behavior)

These parameters exist only in the Action version of the animation plugin.
They add non-looping animation capabilities and the ability to run another action when cycles finish.

1. Loop_Animation

Type: bool,Default: true

What it does

  • When true, the animation runs forever in an endless ping-pong loop.

  • When false, the animation plays only a limited number of cycles (see Number_Of_Cycles)
    and then stops permanently.

Use case

✔ Floating icons that animate forever → Loop_Animation = true
✔ “Move only 1 time then stop and trigger the next action” → Loop_Animation = false

2. Number_Of_Cycles

Type: float,Default: 1

What it does

Defines how many animation cycles will play when Loop_Animation = false.

A “cycle” = a full ping-pong (forward → backward).

Supports floats

You can use:

  • 1.0 → one full cycle

  • 2.0 → two full cycles

  • 0.5 → only half a cycle

  • 0.25 → a quarter cycle

  • 3.75 → extremely precise timing

Note

Ignored when Loop_Animation = true.

3. End_Cycles_Action

Type: action

What it does

Once the animation finishes the number of cycles defined in Number_Of_Cycles,
this action is automatically triggered.

Triggers only in this case:

  • Loop_Animation = false

  • The animation reaches the end of its final cycle

Never triggers when:

  • The animation loops forever (Loop_Animation = true)

  • The trigger variable is OFF and prevents the animation from starting

Use case

✔ Start another animation after the first one finishes
✔ Trigger a sound or visual effect only after the motion ends
✔ Activate a sequence of actions (“cutscene-style”)

This plugin is ideal for highlighting active buttons, guiding player attention, or simply adding polish to static UI elements — all without writing a single line of code.

Free to use and easy to integrate, this plugin is part of my ongoing effort to make CopperCube more expressive and flexible for indie devs. If it helps your project, a small tip on itch.io is always appreciated. Happy creating! 🎮🧡

Download

Download NowName your own price

Click download now to get access to the following files:

2D_Overlay_Indicator_Animation.ccb 1.8 MB
2D_Overlay_Indicator_Animation_Updated_092525.zip 95 kB
behavior_2D_Overlay_Indicator_Animation.js 3.2 kB

Development log

Comments

Log in with itch.io to leave a comment.

Excellent thanks!

Thanks 🙂

Thanks, I like this plugin! Is it possible to add a function so that it doesn't go back and forth? Just one element appears and then it stops?

(+1)

I see, maybe i will make an action version of it, with cycles setting, so it can do the effect you want.

Thanks so much for the update! Is it possible to make it work when the “position mode” is set to “relative percent” or does it only work with “absolute pixel”?

Thanks for your comment. For now it works only on absolute pixel mode.