Skip to content

Commit

Permalink
Add OpenXR demo project showing off local reference space
Browse files Browse the repository at this point in the history
  • Loading branch information
BastiaanOlij committed Feb 11, 2024
1 parent b74261c commit d1206e9
Show file tree
Hide file tree
Showing 62 changed files with 7,864 additions and 0 deletions.
2 changes: 2 additions & 0 deletions xr/openxr_vehicle_movement/.gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# Normalize EOL for all files that Git considers text files.
* text=auto eol=lf
2 changes: 2 additions & 0 deletions xr/openxr_vehicle_movement/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# Godot 4+ specific ignores
.godot/
8 changes: 8 additions & 0 deletions xr/openxr_vehicle_movement/InfoUI.gd
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
extends CanvasLayer

func set_velocity(p_velocity : float):
%Velocity.text = "Velocity: %0.2f kmph (%0.2f m/s)" % [ p_velocity * 3.6, p_velocity ]

# Called every frame. 'delta' is the elapsed time since the previous frame.
func _process(delta):
%FPS.text = "FPS: " + str(Engine.get_frames_per_second())
30 changes: 30 additions & 0 deletions xr/openxr_vehicle_movement/InfoUI.tscn
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
[gd_scene load_steps=2 format=3 uid="uid://dal5i1c6mh07h"]

[ext_resource type="Script" path="res://InfoUI.gd" id="1_sj0oq"]

[node name="InfoUI" type="CanvasLayer"]
script = ExtResource("1_sj0oq")

[node name="ColorRect" type="ColorRect" parent="."]
custom_minimum_size = Vector2(512, 256)
offset_right = 40.0
offset_bottom = 40.0
color = Color(0.341176, 0.580392, 0.368627, 1)

[node name="VBoxContainer" type="VBoxContainer" parent="."]
offset_left = 25.0
offset_top = 10.0
offset_right = 499.0
offset_bottom = 158.0

[node name="FPS" type="Label" parent="VBoxContainer"]
unique_name_in_owner = true
layout_mode = 2
theme_override_font_sizes/font_size = 32
text = "FPS: 000"

[node name="Velocity" type="Label" parent="VBoxContainer"]
unique_name_in_owner = true
layout_mode = 2
theme_override_font_sizes/font_size = 32
text = "Velocity: 000"
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
11 changes: 11 additions & 0 deletions xr/openxr_vehicle_movement/assets/gokart/license.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
Model Information:
* title: Gokart
* source: https://sketchfab.com/3d-models/gokart-b60878a0f04d43d388dd2a57be419a72
* author: AwEsZ (https://sketchfab.com/AwEsZ)

Model License:
* license type: CC-BY-4.0 (http://creativecommons.org/licenses/by/4.0/)
* requirements: Author must be credited. Commercial use is allowed.

If you use this 3D model in your project be sure to copy paste this credit wherever you share it:
This work is based on "Gokart" (https://sketchfab.com/3d-models/gokart-b60878a0f04d43d388dd2a57be419a72) by AwEsZ (https://sketchfab.com/AwEsZ) licensed under CC-BY-4.0 (http://creativecommons.org/licenses/by/4.0/)
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
[gd_resource type="StandardMaterial3D" format=3 uid="uid://dqaeublsfgxet"]

[resource]
resource_name = "Cube.014__0"
vertex_color_use_as_albedo = true
roughness = 0.6
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
[gd_resource type="StandardMaterial3D" format=3 uid="uid://bqhatpgnbfayc"]

[resource]
resource_name = "Material.001"
vertex_color_use_as_albedo = true
albedo_color = Color(0.906332, 0.906332, 0.906332, 1)
roughness = 0.821115
emission_enabled = true
emission = Color(0.594203, 0.594203, 0.594203, 1)
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
[gd_resource type="StandardMaterial3D" format=3 uid="uid://cv2hslabq63af"]

[resource]
resource_name = "Material.002"
vertex_color_use_as_albedo = true
albedo_color = Color(0.345106, 0.345106, 0.345106, 1)
roughness = 0.978178
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
[gd_resource type="StandardMaterial3D" format=3 uid="uid://c768tjddf3eq"]

[resource]
resource_name = "Material.003"
vertex_color_use_as_albedo = true
albedo_color = Color(0.409976, 0.514569, 0.985366, 1)
roughness = 0.276188
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
[gd_resource type="StandardMaterial3D" format=3 uid="uid://thtm6w6l6x3g"]

[resource]
resource_name = "Material.004"
vertex_color_use_as_albedo = true
albedo_color = Color(0.519994, 0.519994, 0.519994, 1)
roughness = 0.939756
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
[gd_resource type="StandardMaterial3D" format=3 uid="uid://vxoj0lynkbts"]

[resource]
resource_name = "Material.005"
vertex_color_use_as_albedo = true
albedo_color = Color(0.129709, 0.129709, 0.129709, 1)
roughness = 0.996586
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
[gd_resource type="StandardMaterial3D" format=3 uid="uid://csd0uv3t1t6ul"]

[resource]
resource_name = "Material.006"
vertex_color_use_as_albedo = true
albedo_color = Color(0.635294, 0.635294, 0.635294, 1)
metallic = 0.73
roughness = 0.12
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
[gd_resource type="StandardMaterial3D" format=3 uid="uid://usphfm8cljtl"]

[resource]
resource_name = "Material.007"
vertex_color_use_as_albedo = true
albedo_color = Color(0.339284, 0.339284, 0.339284, 1)
roughness = 0.978932
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
[gd_resource type="StandardMaterial3D" format=3 uid="uid://2e3ewnm4kmwc"]

[resource]
resource_name = "Material.008"
vertex_color_use_as_albedo = true
albedo_color = Color(0.822033, 0.822033, 0.822033, 1)
roughness = 0.81088
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
[gd_resource type="StandardMaterial3D" format=3 uid="uid://buhaihrem52b"]

[resource]
resource_name = "Material.009"
vertex_color_use_as_albedo = true
albedo_color = Color(0.595431, 0.595431, 0.595431, 1)
roughness = 0.929957
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
[gd_resource type="StandardMaterial3D" format=3 uid="uid://dy8fo1wov4fb2"]

[resource]
resource_name = "Material.010"
vertex_color_use_as_albedo = true
albedo_color = Color(0.906332, 0.906332, 0.906332, 1)
roughness = 0.747018
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
[gd_resource type="StandardMaterial3D" format=3 uid="uid://da1iluolhagux"]

[resource]
resource_name = "Material.011"
vertex_color_use_as_albedo = true
albedo_color = Color(0.653458, 0.653458, 0.653458, 1)
roughness = 0.914013
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
[gd_resource type="StandardMaterial3D" format=3 uid="uid://52y8qfvj7pys"]

[resource]
resource_name = "Material.012"
vertex_color_use_as_albedo = true
albedo_color = Color(0.448832, 0.448832, 0.448832, 1)
roughness = 0.958275
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
[gd_resource type="StandardMaterial3D" format=3 uid="uid://d4jv657hekp3u"]

[resource]
resource_name = "Material.013"
vertex_color_use_as_albedo = true
albedo_color = Color(0.61038, 0.61038, 0.61038, 1)
roughness = 0.919279
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
[gd_resource type="StandardMaterial3D" format=3 uid="uid://cwyqdq8n52kxf"]

[resource]
resource_name = "Material.014"
vertex_color_use_as_albedo = true
albedo_color = Color(0.766543, 0.312911, 0.328656, 1)
roughness = 0.957246
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
[gd_resource type="StandardMaterial3D" format=3 uid="uid://2xqcil35ckmf"]

[resource]
resource_name = "Material.015"
cull_mode = 2
vertex_color_use_as_albedo = true
albedo_color = Color(0.691153, 0.691153, 0.691153, 1)
roughness = 0.902621
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
[gd_resource type="StandardMaterial3D" format=3 uid="uid://0y4xq7jk6jgw"]

[resource]
resource_name = "Material.015"
vertex_color_use_as_albedo = true
albedo_color = Color(0.691153, 0.691153, 0.691153, 1)
roughness = 0.902621
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
[gd_resource type="StandardMaterial3D" format=3 uid="uid://bgvmnvdrkutv7"]

[resource]
resource_name = "Material.016"
vertex_color_use_as_albedo = true
albedo_color = Color(0.594224, 0.594224, 0.594224, 1)
roughness = 0.930269
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
[gd_resource type="StandardMaterial3D" format=3 uid="uid://cstrxte8w75kg"]

[resource]
resource_name = "Material.017"
vertex_color_use_as_albedo = true
albedo_color = Color(0.172139, 0.172139, 0.172139, 1)
roughness = 0.994392
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
[gd_resource type="StandardMaterial3D" format=3 uid="uid://boblofr4cshco"]

[resource]
resource_name = "Material.018"
vertex_color_use_as_albedo = true
albedo_color = Color(0.603091, 0.603091, 0.603091, 1)
roughness = 0.915597
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
[gd_resource type="StandardMaterial3D" format=3 uid="uid://mob83pxu5ilv"]

[resource]
resource_name = "Material.019"
vertex_color_use_as_albedo = true
albedo_color = Color(0.704722, 0.743734, 0.610886, 1)
roughness = 0.891021
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
[gd_resource type="StandardMaterial3D" format=3 uid="uid://b1sxts1b0crfs"]

[resource]
resource_name = "Material.020"
vertex_color_use_as_albedo = true
albedo_color = Color(0.394256, 0.394256, 0.394256, 1)
roughness = 0.971182
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
[gd_resource type="StandardMaterial3D" format=3 uid="uid://cyswii48wfoct"]

[resource]
resource_name = "Material.021"
vertex_color_use_as_albedo = true
albedo_color = Color(0.813327, 0.813327, 0.813327, 1)
roughness = 0.859874
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
[gd_resource type="StandardMaterial3D" format=3 uid="uid://b7iab86bemdgw"]

[resource]
resource_name = "Material.022"
vertex_color_use_as_albedo = true
albedo_color = Color(0.42666, 0.42666, 0.42666, 1)
roughness = 0.965939
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
[gd_resource type="StandardMaterial3D" format=3 uid="uid://d2rqx5bspsj21"]

[resource]
resource_name = "Material.023"
vertex_color_use_as_albedo = true
albedo_color = Color(0.646661, 0.646661, 0.646661, 1)
roughness = 0.91598
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
[gd_resource type="StandardMaterial3D" format=3 uid="uid://kqy0u8xxds35"]

[resource]
resource_name = "Material.024"
vertex_color_use_as_albedo = true
albedo_color = Color(0.60166, 0.77659, 0.790989, 1)
roughness = 0.598928
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
[gd_resource type="StandardMaterial3D" format=3 uid="uid://d2bj1ek3oad08"]

[resource]
resource_name = "Material"
vertex_color_use_as_albedo = true
albedo_color = Color(0.411765, 0.513726, 0.984314, 1)
roughness = 0.440603
Binary file not shown.
Loading

0 comments on commit d1206e9

Please sign in to comment.