Skip to main content

Luau Ping-Pong

Demonstrates a simple animation script that moves an entity up and down.

Overview

This example shows the ping-pong script that animates an entity using sine wave motion.

Script Code

The script is available at:

https://blazium-engine.github.io/DDDBrowserExamples/assets/pingpong.luau

Features

  • on_start() initialization
  • on_update(dt) frame updates
  • Engine.setEntityPosition() entity manipulation
  • Frame-rate independent animation

Try It

Load this example:

https://blazium-engine.github.io/DDDBrowserExamples/luau-pingpong.html

Next Steps