Engine API Reference - v2.23.0-beta.17
    Preparing search index...

    Class InputControllerAlpha

    The base class for all input controllers. A controller consumes an InputFrame carrying move and rotate deltas and produces a Pose: attach sets the pose it starts from, update applies a frame and returns the current pose, and detach releases it. The application applies the returned pose to an entity. FlyController, OrbitController and FocusController implement three ways of doing this.

    controller.attach(pose.look(cameraPosition, target));

    // each frame, after filling the frame's move and rotate deltas from your sources
    const result = controller.update(frame, dt);
    camera.setPosition(result.position);
    camera.setEulerAngles(result.angles);

    Hierarchy (View Summary)

    Index
    _pose: Pose = ...
    • Alpha

      Parameters

      • pose: Pose

        The initial pose of the controller.

      • Optionalsmooth: boolean = true

        Whether to smooth the transition.

      Returns void