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()initializationon_update(dt)frame updatesEngine.setEntityPosition()entity manipulation- Frame-rate independent animation
Try It
Load this example:
https://blazium-engine.github.io/DDDBrowserExamples/luau-pingpong.html
Next Steps
- Lua/Luau API - Lifecycle - Learn lifecycle methods
- Lua/Luau API - Engine - Entity manipulation
- Script Examples - More script examples