-1

Try to disable tracking position on occulus, don't find any doc on it.

I've search postionnal tracking, but nothing in aframe

https://github.com/aframevr/aframe/search?utf8=%E2%9C%93&q=tracking&type=

Maybe with THREE.JS?

rene
  • 41,474
  • 78
  • 114
  • 152

3 Answers3

1

This is not possible using any built-in A-Frame components, as of 0.8.0. What you're probably looking for is the look-controls component, which handles mouse and headset rotation/position.

look-controls documentation

There is an option to disable HMDs entirely, but none for just turning off position. You could request the feature or create your own version of look-controls, but I would be hesitant about that — it will make VR experiences much less comfortable for HMD users.

Don McCurdy
  • 10,975
  • 2
  • 37
  • 75
  • I've tried to disable hmd, but no effect. It's look like [this bug](https://github.com/aframevr/aframe/issues/3459). [Remove VREffect / VRControls in favor of the new WebGLRenderer API](https://github.com/aframevr/aframe/pull/3152) has a big impact. – Stephane Demotte Mar 21 '18 at 00:26
  • Hm bug or no, it wasn't intended to disable positional tracking. It would (if it worked) disable rotation too. So I think the feature you want currently doesn't exist. – Don McCurdy Mar 21 '18 at 02:56
0

Quick hack :)

This code is not tested, but here the idea :)

// html
<entity class="Camera__parent">
  <camera class="Camera" />
</entity>

//js
const cameraParent = document.querySelector('.Camera__parent')
const camera = document.querySelector('.Camera')

function update() {
  requestAnimationFrame(update)
  cameraParent.object3D.position.y = -camera.object3D.position.y
}

if(AFRAME.utils.device.checkHasPositionalTracking())
  update()
0

I would have to agree with Don that limiting positional tracking on any 6 DOF device makes for a bad user experience as certain types of movement are expected; but there is always room for experimentation!

Though not built into A-Frame you could look at creating a component to reset position (and only position - if you mess with the matrix transforms they will overwrite all transforms - scale, transform, rotation - in the THREEjs layer underneath).

Looks like there is an example below that might work. You could also look here for a start glitch.com/edit/#!/aframe-parent-constraint though I must admit I had difficulties updating individual transforms at the end.