Under Attribution-NonCommercial-ShareAlike 4.0 International License
Cwig's under MIT License
Jsyang's under GPL-3.0 License
An easy way to use GearVR for more complicated use cases such as VR game that need 6DOF tracking.
- Camera tracks colors for position tracking.
- Gear VR controllers already have Built-in 3DOF tracking.
import { ClientTracking } from "./dist/GearVRController.js";
var tracking = new ClientTracking(codePreviewElement, threejsHandObject);
import { ServerTracking } from "./dist/GearVRController.js";
var tracking = new ServerTracking(clientCode);
const { Server } = require("socket.io");
const { createServer } = require('http');
const server = createServer(app);
const io = new Server(server);
io.on('connection', (socket) => {
console.log('User connected ' + socket.id);
socket.on("controllerDataOut", (id, data) => {
socket.to(id).emit("controllerDataIn", data);
});
socket.on('disconnect', () => {
console.log('User disconnected');
});
});
server.listen(8080, () => {
console.log(`Web app listening on port ${8080}`);
});
- Get 2 shuttlecocks and make sure that one is red and one is green.
- Cut the feathers off of the shuttlecocks.
- Remove the blue tape off both of the shuttlecocks.
- Cut off the tape into 3 bits width ways so you have 3 smaller bits of tape.
- Tape one on one side and the other on the oppersite side of the light.
- Finish by Wrapping the 3rd bit around the whole bottom like the blue tape was.
- Attach both loose ends of tape to both sides of the controller.
- Fill in the gaps with more tape making sure that none of it sticks to the controller so it is easy to turn on and off the light.
- Repeat for the second controller.
- You should now have 2 controllers that look simular to mine.
- Plug in your webcam.
- Open the webpage in a chromium-based browser.
- Your done!
- CrazyH (Made this repo, added positional tracking and support for multiple controllers)
- Huge thanks to Cwig for gearvr exploration which created the foundation for the Gear VR controller tracking.
- Thanks to jsyang as well for creating a library that Cwig improved on.