/GodotXROpenXRTracker

Godot XR Tracker for OpenXR

Primary LanguageGDScriptMIT LicenseMIT

Godot XR OpenXR Tracker

GitHub forks GitHub Repo stars GitHub contributors GitHub

This repository contains a demo project to evaluate Godot OpenXR hand, body, and face tracking.

OpenXR Preview

Versions

This demo requires Godot 4.3-dev6+ or later.

NOTE: This requires the XR Trackers PR which is in the Godot master branch, but no release has been made.

Overview

Godot has built-in support for generating XRHandTracker data from OpenXR, and the Godot-OpenXR-Vendors extension adds support for XRBodyTracker and XRFaceTracker.

This data can be used to drive avatars through the XRHandModifier3D, XRBodyModifier3D, and XRFaceModifier3D nodes.

The demo scenes in this project show how this is achieved.

Body Demo (default)

Body Demo

This scene contains two avatars - one worn by the player, and one mirroring the players face and body movements. These avatars are driven by XRBodyModifier3D, and XRFaceModifier3D nodes.

Scaling can be achieved by picking up and using the VR controllers:

  • Left controller AX/BY buttons adjust the Skeleton3D motion_scale property of the bodies or hands.
  • Right controller AX/BY buttons adjust the XRServer world_scale property of the environment.

Hand Demo

Hand Demo

This scene contains two hand models worn by the player to demonstrate VR hands that track the players hands. These hand models are driven by two XRHandModifier3D nodes.

Scaling can be achieved by picking up and using the VR controllers:

  • Left controller AX/BY buttons adjust the Skeleton3D motion_scale property of the bodies or hands.
  • Right controller AX/BY buttons adjust the XRServer world_scale property of the environment.

Note that touching the controller buttons will cause OpenXR to switch to "Controller-mode" temporarily, which results in the hands being hidden. Putting the controllers down for a few seconds will restore "Hand-Tracking mode" and show the hands again.