-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update gdscript plugin XRRig to be in line to csharp changes
Added to T5XRRig: var glasses_id : StringName var gameboard_type := T5Def.GameboardType.Unknown var gameboard_size := AABB() var origin : T5Origin3D var camera : T5Camera3D var wand : T5Controller3D Updated T5 interface to use these Added T5Def to hold gameboard type and wand control names
- Loading branch information
1 parent
c4c71fb
commit bc92410
Showing
8 changed files
with
143 additions
and
200 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
class_name T5Def extends Object | ||
|
||
enum GameboardType { | ||
LE = TiltFiveXRInterface.LE_GAMEBOARD, | ||
XE = TiltFiveXRInterface.XE_GAMEBOARD, | ||
XE_Raised = TiltFiveXRInterface.XE_RAISED_GAMEBOARD, | ||
Unknown = TiltFiveXRInterface.NO_GAMEBOARD_SET | ||
} | ||
|
||
const WAND_BUTTON_A := &"button_a" | ||
const WAND_BUTTON_B := &"button_b" | ||
const WAND_BUTTON_X := &"button_x" | ||
const WAND_BUTTON_Y := &"button_y" | ||
const WAND_BUTTON_1 := &"button_1" | ||
const WAND_BUTTON_2 := &"button_2" | ||
const WAND_BUTTON_STICK := &"button_3" | ||
const WAND_BUTTON_T5 := &"button_t5" | ||
const WAND_BUTTON_TRIGGER := &"trigger_click" | ||
# Axis | ||
const WAND_ANALOG_STICK := &"stick" | ||
const WAND_ANALOG_TRIGGER := &"trigger" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,28 @@ | ||
class_name T5XRRig extends SubViewport | ||
## represents a scene with all the components needed for Tilt Five tracked glasses and wand | ||
|
||
@onready var wand = $Origin/Wand_1 | ||
## An ID attached to a pair of Tilt Five glasses | ||
var glasses_id : StringName | ||
|
||
## Type of gameboard that is set up | ||
var gameboard_type := T5Def.GameboardType.Unknown | ||
|
||
## size of the gameboard in meters. Raised XE gameboards can have a height | ||
var gameboard_size := AABB() | ||
|
||
## the node that relates the center of the gameboard to world coordinates | ||
var origin : T5Origin3D | ||
|
||
## the tracked camera | ||
var camera : T5Camera3D | ||
|
||
## the tracked wand controller | ||
var wand : T5Controller3D | ||
|
||
func _enter_tree(): | ||
origin = $Origin | ||
camera = $Origin/Camera | ||
wand = $Origin/Wand_1 | ||
|
||
func _process(_delta): | ||
if wand: | ||
var wand_pose : XRPose = wand.get_pose() | ||
if wand_pose: | ||
wand.visible = wand_pose.tracking_confidence != XRPose.XR_TRACKING_CONFIDENCE_NONE | ||
else: | ||
wand.visible = false | ||
if wand: wand.visible = wand.get_has_tracking_data() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.