-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
30 additions
and
13 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 |
---|---|---|
@@ -1,5 +1,5 @@ | ||
AutoOculusTouch - Helper library to provide AutoHotKey with Oculus Touch state. | ||
Copyright (C) 2017 Kojack ([email protected]) | ||
Copyright (C) 2018 Kojack ([email protected]) | ||
|
||
AutoOculusTouch is released under the MIT License | ||
https://opensource.org/licenses/MIT | ||
|
@@ -9,40 +9,57 @@ AutoOculusTouch is a library and script for AutoHotKey. It allows you to read th | |
|
||
Prerequisites | ||
You must have AutoHotKey installed. It is available from https://autohotkey.com | ||
(AutoOculusTouch is tested against AutoHotKey version 1.1.24.04) | ||
(AutoOculusTouch is tested against AutoHotKey version 1.1.29.01) | ||
|
||
|
||
Change History | ||
v0.1.1 - Initial release. Built against Oculus SDK 1.10 | ||
v0.1.2 - Added capacitive sensor support. Built against Oculus SDK 1.20 | ||
v0.1.3 - Changed initialisation to use Invisible mode. Added button comments to example script. | ||
v0.1.4 - Added vibration. Added orientation tracking (yaw, pitch, roll) for touch. More example scripts. Built against Oculus SDK 1.26 | ||
|
||
Installation | ||
AutoOculusTouch can be placed anywhere. No explicit installation is required. | ||
There are two files included in the AutoOculusTouch binary release: | ||
- auto_oculus_touch.dll (A library that wraps around the Oculus SDK. | ||
- oculus_touch.ahk (An AutoHotKey script that calls auto_oculus_touch.dll) | ||
You should keep these two files together. | ||
There are several files included in the AutoOculusTouch binary release: | ||
- auto_oculus_touch.dll (A library that wraps around the Oculus SDK. | ||
- auto_oculus_touch.ahk (An AutoHotKey script that defines various Oculus related functions. This is needed by the other scripts) | ||
- oculus_remote_mouse.ahk (Lets you use the remote as a mouse. Up/Down/Left/Right move. The centre button is left mouse. The back button is right mouse) | ||
- oculus_remote_spotify.ahk (Send media keys with the remote. Up is previous track, Down is next track, centre button is play/pause. Not just for spotify, works with any media key compatible program) | ||
- oculus_touch_mouse.ahk (Move the mouse with the right touch controller. Index trigger is left mouse. A is right mouse. Thumbstick is mouse move. Hold the hand trigger to enable tracking, then pitch or yaw the mouse to move. Press B to reset yaw centre point to your current heading) | ||
- oculus_touch_test.ahk (Display a GUI of all touch values) | ||
|
||
You should keep these files together. | ||
|
||
|
||
Running | ||
To start AutoOculusTouch, double click on the oculus_touch.ahk script. A green icon with a white H should appear in your system tray. AutoOculusTouch is now running. | ||
To start AutoOculusTouch, double click on one of the scripts (not auto_oculus_touch.ahk, it doesn't do anything on it's own). A green icon with a white H should appear in your system tray. AutoOculusTouch is now running. | ||
|
||
|
||
Customising | ||
The provided script has some example behaviour already defined. You can change any of this. Currently it does the following: | ||
- Right thumbstick moves the windows mouse cursor. | ||
- Touch X button and right Touch index trigger both control the left mouse button. | ||
- Up and down on the Oculus remote do media previous and next (track selection in programs like Spotify) | ||
|
||
In the script, search for the "; Now to do something with them." comment. Below this are all the behaviours. | ||
The provided scripts has some example behaviour already defined. You can change any of this, or make your own. | ||
|
||
AutoOculusTouch can give you: | ||
- index and hand triggers of a Touch, as floats from 0.0 to 1.0. | ||
- thumbstick axes as floats from -1.0 to 1.0. | ||
- all Touch, Remote and XBox buttons. | ||
- all Touch capacitive sensors. | ||
- all Touch capacitive gestures (index pointing and thumbs up for either hand). | ||
- Pitch, Roll and Yaw of both touch controllers in degrees. | ||
- Set continuous or one shot vibration effects of different frequencies and amplitudes on either touch controller. | ||
|
||
Vibration Use | ||
Vibration has 3 properties: frequency, amplitude and oneshot. | ||
Frequency: 1==320Hz, 2==160Hz, 3==106.7Hz, 4=80Hz (this is the frequency of vibration) | ||
Amplitude: 0-255 (0 stops vibration, 1-255 are the strength) | ||
Oneshot: If this is zero, the vibration will stay at the level you set until you manually change/stop it. If this is 1, the vibration will be a short pulse then stops on it's own. | ||
|
||
Orientation Use | ||
Yaw: clockwise is positive | ||
Pitch: aiming up is positive | ||
Roll: tilting clockwise is positive | ||
Yaw works a little different to the other two angles. Pitch and roll have definite zero angles that make sense (holding the controller level). But yaw is based on where the controller is aiming when powered on. To fix this, you can call ResetFacing(controllerNumber) to record the current direction as a Yaw of 0 degrees. | ||
Each controller may have a different Yaw origin. | ||
If you aren't wearing the Oculus headset, camera tracking is disabled. Touch rotation can still be tracked, but it is done with the onboard IMUs, which may drift over time. | ||
|
||
|
||
Important Notes | ||
|