← Back to Docs
  • index.html
  • Clayground
  • Clayground.Character3D
  • CharacterCamera
  • Clayground 2025.2
  • CharacterCamera QML Type

    Third-person camera that follows a Character. More...

    Import Statement: import Clayground.Character3D

    Properties

    Detailed Description

    CharacterCamera provides an orbiting third-person camera that follows a Character. It automatically positions itself behind and above the character, looking at the character's head.

    The camera orbit can be adjusted using orbitYawOffset, orbitPitch, and orbitDistance properties.

    Example usage:

    import Clayground.Character3D
    
    Character {
        id: hero
    }
    
    CharacterCamera {
        character: hero
        orbitDistance: 30
        orbitPitch: 25
    }

    See also Character and CharacterController.

    Property Documentation

    character : Character

    The character to follow.


    clipFar : real

    Far clipping plane distance.


    clipNear : real

    Near clipping plane distance.


    maxOrbitDistance : real

    Maximum allowed orbit distance.


    maxOrbitPitch : real

    Maximum pitch angle (looking up limit).


    minOrbitDistance : real

    Minimum allowed orbit distance.


    minOrbitPitch : real

    Minimum pitch angle (looking down limit).


    orbitDistance : real

    Distance from the character.


    orbitPitch : real

    Vertical angle above horizontal (degrees).


    orbitYawOffset : real

    Horizontal offset from character's facing direction (degrees).

    180 means camera is behind the character.