.. _about_godot_game_engine:

Godot Plugin
============

The SDK archive includes a beta Godot plugin in ``godot/addons/beam_eye_tracker``.
It exposes the Beam Eye Tracker C# API through Godot-compatible nodes, signals,
and data types.

.. note:: This beta Godot plugin included in the SDK archive is Windows-only. It ships
   with the Windows Beam SDK native client library under the plugin's
   ``bin/x86_64`` folder. Advanced users may be able to adapt it to other platforms, given the
   the platform-specific Beam SDK native client library is available.

.. _godot_installation:

Godot Plugin Installation
-------------------------

#. Copy ``godot/addons/beam_eye_tracker`` from the SDK archive into your Godot
   project's ``addons`` directory.
#. Enable the plugin from ``Project > Project Settings > Plugins``.
#. Make sure the Beam Eye Tracker application is installed and configured.

Camera and Tracking Data
------------------------

The plugin provides ``BeamEyeTrackerInputDevice`` for accessing:

* unified-screen and viewport gaze;
* head pose;
* smoothed sim game camera position and rotation;
* foveated rendering state;
* tracking status changes.

The plugin samples the smoothed sim game camera state once per Godot frame,
matching the SDK recommendation for game-engine integrations. The camera rotation
output preserves the SDK 2.2 convention described in :ref:`sim_mapping` while
exposing a Godot ``Basis`` for direct camera control.
``BeamEyeTrackerInputDevice`` also exposes ``IsCameraPoseValid`` and
``CameraPoseValidityChanged`` so client code can distinguish tracking reception from
availability of a valid smoothed camera pose. The bundled ``CameraControlBehaviour.cs``
resets its controlled camera pose to identity once when a previously valid camera
pose becomes invalid. A developer can decide whether to apply this reset or return controls
to mouse and keyboard in a custom behaviour.

See the plugin's bundled ``Documentation~/beam-eye-tracker.md`` and
``README.md`` files for Godot-specific usage snippets.
