godotengine / godot-demo-projects

Demonstration and Template Projects
https://godotengine.org
MIT License
5.48k stars 1.53k forks source link

Add OpenXR demo project showing off local reference space #1012

Open BastiaanOlij opened 5 months ago

BastiaanOlij commented 5 months ago

This demo shows off how to create a vehicle centric XR game using OpenXR.

The basic idea is a simple go-kart race game. Important here is the use of the "local" reference space.

It also shows mixing traditional inputs (keyboard/gamepad/steering wheel) with XR input.

If the player uses their controllers and holds them near the steering wheel, they will snap into place and the player will be able to turn the wheel. The triggers on the controller are used to accelerate (right controller) and brake (left controller)

BastiaanOlij commented 5 months ago

For those who are interested in this, recording of the stream in which I build the first part of this demo: https://youtube.com/live/eWpNwrPTiqw

BastiaanOlij commented 5 months ago

I've added a Gokart model from sketchfab that is CC-BY-4.0, hopefully that is acceptable here, else I'll need to look into another one.

This also has a little display on the steering wheel that we've used to display FPS and velocity information. Nice little touch.

Also added a polyhaven skytexture.

capnm commented 5 months ago

xr/openxr_vehicle_movement/assets/uv.jpg

Maybe you could add a separate licences folder, e.g. this one states that the generated textures are of free use. https://uvchecker.vinzi.xyz/EULA.html https://uvchecker.vinzi.xyz/

BastiaanOlij commented 4 months ago

xr/openxr_vehicle_movement/assets/uv.jpg

Maybe you could add a separate licences folder, e.g. this one states that the generated textures are of free use. https://uvchecker.vinzi.xyz/EULA.html https://uvchecker.vinzi.xyz/

I ended up removing it as I only used it temporarily.