Take particular notice of line 15: createDeviceOrientationCamera: false
That means… use YOUR already-created scene camera, and don’t install/activate a new devOr camera. Depending upon WHICH camera you have as the scene camera, its .target might be important.
Thank you for your ideas. I am new to WebVR to and may be wrong, but
line 15 is related to the NOT WebVR camera, I think, the webVRCamera is still created by the vrHelper.
Your playground and “Accessing vr device position and rotation”
does read the “head”-position/orientation of the webVRCamera.
But I need to set/write the orientation of the “body”.
The trouble of so many playgrounds is to find the one, doing what I intent do do. What keywords to use. I tried WebVR of course and rotation/orientation.
Line 36 does SOMETHING. I don’t know what it does… but… maybe something useful. It’s not on the leftController or rightController like lines 43 and 47 deviceRotationQuaternion. Line 36 deviceRotationQuaternion is on the actual camera itself. shrug
I use various methods to set the rotation quaternions, but you can also set quaternions like this…
More useless info, and you probably already knew-about Identity() and Zero(). Maybe we rotate the camera with standard .rotation (with Euler vector3)… and THEN set its rotationQuaternion or deviceRotationQuaternion to Identity() or Zero(). I dunno. I’m REALLY guessing, now. hehe.
The vrHelper itself has a pair of internal-use properties called ._workingQuaternion and ._workingVector, too… probably not for us… but test-able, I suppose. If it’s a rotation-related property, what the heck… worth looking-at.
Sorry I’m a poor helper, here. If you want, I can delete all my posts on this subject and we can set your thread back to “0-replies” which MIGHT get more attention from better helpers than I. No problems. I’m just sort-of guessing, anyway.
Yes! deviceRotationQuaternion changes the initial direction of th VR view, also usefull.
Cyclically rotationQuaternion works fine to set the orientation! I am happy.
Your FromEulerAngles(0, 1, 0) means y = +1 rad rotated. This way I could control all axis and even maneuver an X-Wing fighter “soon”
If you change the vrcamera’s rotationQuaternion (which acts as a container for the VR experience) you can change the direction to which you are facing:
Sure, to set .rotationQuaternion cyclically gives you total control. (not .rotation, would be nice to)
I also saw the source of BJS you showed to me. But because it is done by an Animation there, I was not sure. Now I am.
Soon, I will add a video (link) here to show you all, what I did.