Getting StartedBeginner

Build your first playable scene

Create a floor, character, camera, and Lua controller, then test the result.

1. Create the world

  1. Open the Initial Scene.
  2. Add a cube, scale it into a floor, and keep its motion static.
  3. Add a Character above the floor.
  4. Add or select a camera and mark it active.

2. Add a controller script

Create a project script, attach it to the character, and use the shared input bus:

local moveSpeed = 5.0

function update(deltaTime)
    local velocity = gameObject.getCharacterVelocity()
    local moveX, moveZ = 0, 0

    if input.moveForward then moveZ = 1 end
    if input.moveBackward then moveZ = -1 end
    if input.moveLeft then moveX = 1 end
    if input.moveRight then moveX = -1 end

    if input.jump and gameObject.isOnGround() then
        gameObject.jump()
    end

    gameObject.setCharacterVelocity(
        moveX * moveSpeed,
        velocity.y,
        moveZ * moveSpeed
    )
end

3. Test

Run simulation, verify movement and jumping, then stop. If the character falls through the floor, confirm the floor has physics enabled and the character begins above it.

Coordinate convention

Airogel characters face local +Z. Forward movement is moveZ = 1; backward movement is moveZ = -1.