Skip to content

Instantly share code, notes, and snippets.

@RSpace
Created February 3, 2017 21:31
Show Gist options
  • Save RSpace/921a65d4e4024b5c1bf220a0f8315c59 to your computer and use it in GitHub Desktop.
Save RSpace/921a65d4e4024b5c1bf220a0f8315c59 to your computer and use it in GitHub Desktop.
// This results in correct positioning on the Rift
this.el.setAttribute('position', {
x: 0,
y: currentPosition.y,
z: 0
})
// REMOVED: This is what previously worked for Vive and Gear VR - needs testing!
// this.el.setAttribute('position', {
// x: currentPosition.x - this.data.position.x,
// y: currentPosition.y - this.data.position.y,
// z: currentPosition.z - this.data.position.z
// })
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment