This code uses the SkereoKit open source OpenXR library https://github.com/StereoKit/StereoKit
The project is a VSCode project, so see the following instructions on how to set up: https://stereokit.net/Pages/Guides/Getting-Started-VS-Code.html
This is a first draft, so expect more features and refinements as I progress with my own project that makes use of this code.
Creates a sample environment to test the classes below.
Shows a controller that you can grab and drag using hand tracking to move the player around the scene. Supports walking / flying modes, smooth and snap turning. Supports analogue stick movement, you move the direction you point your left hand. Displays a compass on the controller and the floor to orient you in game, while other markings orient you in your physical space. Also provides a volumetric menu that allows you to choose a teleport destination. Use the hand menu to initiate movement, the teleport menu or the settings pannel.
This shows a 3d volumetric menu and allows selection with your finger tip. It is used to select teleport destinations but can also be used as a 3d keyboard. I will add a sample for the 3d keyboard at a later date.
Create SDF icons from font files (use FontForge to create your own). This class will async generate the SDF for a given character. It's intended for big icons rather than text. A single texture atlas is used and grows as required up to your configured maximum then the oldest slots are reused. StbTrueType is used (via StbTrueTypeSharp). It's processor intensive, hence the async.
Allow hands to be easily hidden or faded out when required. You need to call a method each frame to keep them faded / hidden so you don't have to worry about turning them back on.
A simple class to show a window with a choice of standard buttons.
A shader to draw a floor that uses concentric circles and radial lines to guide you to centre stage.
A general class for small handy functions
- Add an optional cage / dashboard as an additional comfort option.
- Add settings for height adjustment