Skip to content

Commit

Permalink
Updated documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
patrickdown committed Feb 24, 2023
1 parent 570fcd4 commit c2a67f5
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 7 deletions.
6 changes: 2 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,11 +49,9 @@ If you want to use the extension in your own project follow these steps.

1) Copy `example\addons` to your own projects root directory.

2) In Godot's project setting add `addons\tilt-five\TiltFiveManager` into the `Autoload` tab.
2) From `addons\tilt-five\scenes` load the `t5-scene` and run.

3) From `addons\tilt-five\scenes` load the `t5-scene` or `TiltFiveRig` scenes and run.

4) From here you should be able to follow documentation for usage of Godot's AR/VR system.
3) From here you should be able to follow documentation for usage of Godot's AR/VR system.

## Dependencies

Expand Down
14 changes: 11 additions & 3 deletions example/addons/tilt-five/scenes/Main.gd
Original file line number Diff line number Diff line change
@@ -1,15 +1,23 @@
extends Spatial


# Called when the node enters the scene tree for the first time.
func _ready():
# Starts looking for available
# Tilt Five glasses to use
# It will signal glasses_available
# when they are found
if $T5Manager.start_service():
print("Service started")


func _on_T5Manager_glasses_available():
# This will reserve the first pair of
# glasses it can for use. It will signal
# glasses_reserved when done
$T5Manager.reserve_glasses()

func _on_T5Manager_glasses_reserved(success):
# The result of calling reserve_glasses()
# If successful then the glasses may be
# rendered to by setting the viewport
# arvr flag
if success:
get_viewport().arvr = true

0 comments on commit c2a67f5

Please sign in to comment.