« first day (3023 days earlier)      last day (2001 days later) » 

3:49 AM
@Almo I also got fed up with the previous round of Chrome UX 'improvements'. I switched been using Vivaldi for a month or two now. Thus far they've been pretty good about letting me tune the UX to me needs (cuz wanting a full URL in the address bar makes one a radical these days or something). It's chromium based, so the few extensions I want still work too.
@Almo I suppose the chromium base is also a drawback for some though, and I'll cede that point. And once I ran into an issue where a site wouldn't serve up its content because near as I can tell, it was looking for 1 of the big 3.
 
 
11 hours later…
3:02 PM
heh yeah
 
 
4 hours later…
6:41 PM
Hi all. If I may ask a Q, I'm having a small problem resulting from a lack of understanding of Quaternions. I have an empty gameobject parented to my Main Camera in the scene. I use this empty object as an attach point to bring objects center screen in front of the user.
I am using the Quaternion produced from an Oculus controller to set the rotation of objects parented to my attach point.
Currently (this)[pastebin.com/raw/8XhaJLn1] is what I have. Its close to what I want. The problem is that the pitch and roll appear to be inverted?
 
7:05 PM
Good place to ask, I can't help with Quaternions. I didn't use them more than a teeny bit in my physics training at school
 
7:37 PM
Roger. Asked the question on Unity. Thanks for the swift response.
 
7:56 PM
someone else might show up here who knows
 
8:50 PM
@jtth Do you know what coordinate system your oculus controller's quaternion is represented within?
 
9:12 PM
@DMGregory World vs local? Unity quaternion? Please clarify
 
That's what I'm looking for from you. When the controller is in the identity rotation (w = 1 / xyz = 0), where does the x axis, y axis, and z axis point? And are those directions relative to the headset or the sensor stations or something else?
 
Gotcha. Controller is pointing straight ahead @ identity. Directions are relative to the headset. Setting the transform.rotation to the controllers.trans.rot works perfectly. I added the pieces trying to compensate for the headset so that when the headset is moving with the controller, i.e., the user is say spinning in a seated chair or turning whilst standing up, the model won't be turning. Does that make sense
Straight ahead being if you held out your hand and pointed straight in front of you
 
9:28 PM
So, in your spinning chair example, when your headset and controller are turning in perfect sync, the controller's reported quaternion - before you do anything to it in script - stays fixed at (0,0,0,1) no matter which way the chair turns?
(Apologies for the slow response — I'm at the office just now and only able to check chat occasionally)
 
No worries, like wise. Negative. The controllers quaternion changes, thus I include the Quaternion multiplication to (hopefully) compensate for this. (ctrl.trans.rot*camera.trans.rot) to get the ctrl's rot in world space and then * inverse(camera.trans.rot) to subtract the cameras quaternion from the ctlr's
This appears to be working, but it inverts pitch and roll (from what I can tell)
 
Okay, so before your correction, I need to know what space the source data is in. Is it relative to the desk-mounted Oculus camera?
 
9:50 PM
Source data being the headset yes? The headset is an Oculus go headset. I'm not a 3d math expert. I'm using camera.trans.rot so it must be in world space as I'm not using camera.trans.LocalRot
 
The Quaternion rots from the head.
hahahaha
(there's a saying, "the fish rots from the head")
 
10:32 PM
You query some API to get a quaternion representing the controller orientation. To help you, I need to know what that quaternion represents: what direction its x, y, and z axes point.
Then, once we understand that foundation unambiguously, we can work out how to transform that source of data into the output that you need. I just want to isolate the input we have to work with first, because if we start talking about modified values it's easy to get lost in which stage of the process we're discussing.
 
Right. I'm using Unity, so... The Camera rotation is acquired from its transform via GameObject.Transform.Rotation or .LocalRotation, likewise for the Oculus controller. The code I've written here is using a combination of the controller and the headsets rotation.
The headset is always at origin, likewise for the controller. The oculus go doesn't support spatial awareness. Thus its a 3d environment in which the headset and controller can only rotate in.
How else can I clarify?
The math, as it is currently, is object.rotation = (ctrl.localRot * camera.worldRot) * inverse(camera.worldRot). The first mult is to get the ctrls rot in the world space. The second is substracting the two rots.
The behavior is what I want, except, pitch and roll are inverted. Yaw works perfectly.
 
10:49 PM
The link takes me to a page that says "This page has been removed!"
 
object.rotation = (ctrl.localRot * camera.worldRot) * inverse(camera.worldRot)
 
Okay, so to repeat my question again: you've sat down with your controller, and fiddled with it until its orientation reports (0, 0, 0, 1). Which way does its local x axis, y axis, and z axis point?
 
Forward. In the direction of the Cameras forward.
 
All three axes are pointing toward camera forward? I doubt that's what you mean.
 
Gregor at this point it feels as if you're purely pulling my leg friend. I can't debug the Oculus go at runtime. I can print out the values of the x,y,z axis.
 
10:58 PM
I've asked you the bare minimum info I need to be able to get started on your problem. This is the first step I do when calibrating any type of motion controller.
Once we understand our inputs thoroughly, we can figure out how to map them to our desired outputs in a structured way, rather than guessing-and-checking or flipping signs at random.
 
@jtth I would ask the same thing DM did (where do the local axes point), and you answered "forward". All three axes are not pointing forward, I assure you.
 
x forward, y up, z left
 

« first day (3023 days earlier)      last day (2001 days later) »