Hi, my question this. When moving the camera via phone or headset, it is 6DoF and the camera’s position can change along with its rotation. I’d like to restrict to just rotation (so fixed position) like with 3DoF. How would I do this? emitting “Recenter” updates both position and rotation of the camera, but I read in the documentation you can set the target position and rotation. This is what I tried.
Attached to the a-camera. It doesn’t seem to be working, and the rotation is always updating to the same rotation instead of what the camera’s current rotation is.
@Austin_Donnelly - @Evan’s suggestion will work on Android (since gyro is enabled by default), but for iOS you’ll probably need to request gyro permissions explicitly (if disableWorldTracking is set to true then our engine doesn’t request gyro for you). You shouldn’t need any of your custom code from your original post.
Simply add a pipeline module that sets gyro as a dependency, for example
Adding this helped with iOS when I wanted to set disableWorldTracking to true.
Next, I realized that just setting the attribute or value of disableWorldTracking to true on an existing xrweb component doesn’t actually change it. You either have to remove xrweb altogether and then add it again with this attribute or just add xrweb manually in a component instead.
For my goal, I wanted to essentially remove world tracking for mobile devices only, so I did this in one of my components.
@Austin_Donnelly Glad to hear you have things working. You are correct that you can’t modify disableWorldTracking at runtime, so you’ll have to remove and add/re-add xrweb to change things.