Skip to content

Commit 02899e4

Browse files
committed
Update to use Vive Tracker Model
1 parent 401e4bf commit 02899e4

2 files changed

Lines changed: 17 additions & 9 deletions

File tree

README.md

Lines changed: 16 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -37,14 +37,22 @@ If you would like to test this out, please do the following.
3737

3838
- Install the driver (from the releases or build it yourself using below instructions)
3939
- Start SteamVR and connect a headset
40-
- Navigate to https://www.websocket.org/echo.html
41-
- Set location to:
42-
- `ws://127.0.0.1:8082`
43-
- Press connect
44-
- Set message to:
45-
- `{"id":"tracker_0","x":1,"y":1,"z":1}`
46-
- Press send
47-
- In the SteamVR UI you should now see a tracker icon, and within SteamVR there should be a tracker shown (it may show as a controller model)
40+
- Start a local webserver
41+
- Open a console and paste and run the following
42+
- ```js
43+
// Create WebSocket connection.
44+
const socket = new WebSocket('ws://127.0.0.1:8082');
45+
46+
// Connection opened
47+
socket.addEventListener('open', function (event) {
48+
socket.send('{"id":"tracker_0","x":0,"y":1,"z":-1}');
49+
});
50+
51+
// Listen for messages
52+
socket.addEventListener('message', function (event) {
53+
console.log('Message from server ', event.data);
54+
});
55+
```
4856

4957
## Building
5058
- Clone the project and submodules

driver_files/src/Driver/TrackerDevice.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,7 @@ vr::EVRInitError ExampleDriver::TrackerDevice::Activate(uint32_t unObjectId)
148148
GetDriver()->GetProperties()->SetInt32Property(props, vr::Prop_ControllerRoleHint_Int32, vr::ETrackedControllerRole::TrackedControllerRole_OptOut);
149149

150150
// Set up a render model path
151-
GetDriver()->GetProperties()->SetStringProperty(props, vr::Prop_RenderModelName_String, "vr_controller_05_wireless_b");
151+
GetDriver()->GetProperties()->SetStringProperty(props, vr::Prop_RenderModelName_String, "../../drivers/htc/resources/rendermodels/vr_tracker_vive_3_0");
152152

153153
// Set controller profile
154154
GetDriver()->GetProperties()->SetStringProperty(props, vr::Prop_InputProfilePath_String, "{example}/input/example_tracker_bindings.json");

0 commit comments

Comments
 (0)