← Back to Docs
  • index.html
  • Clayground
  • Clayground.World
  • ClayWorld3d
  • Clayground 2025.2
  • ClayWorld3d QML Type

    Complete 3D game world with physics, camera, and scene loading. More...

    Import Statement: import Clayground.World

    Detailed Description

    ClayWorld3d provides a 3D game world with Qt Quick 3D physics, automatic camera following or free WASD camera control, and SVG-based scene loading.

    Example usage:

    import Clayground.World
    
    ClayWorld3d {
        anchors.fill: parent
        xWuMax: 200; zWuMax: 200
        observedObject: player
    
        Box3DBody {
            id: player
            position: Qt.vector3d(50, 10, 50)
            width: 20; height: 20; depth: 20
        }
    }

    Properties

    Root 3D scene node for adding entities.

    The Qt Quick 3D physics world.

    Object the camera follows. Set to null for free camera.

    Camera offset from observed object.

    The main camera.

    True when WASD camera control is active.

    Minimum X coordinate (always 0).

    Maximum X world size.

    Minimum Z coordinate (always 0).

    Maximum Z world size.

    The ground plane physics body.