Is there a way to get VR head position and/or orientation ?

  • Hi guys,

    I'm playing a bit with the external_dll given with the SDK in order to gather data from the simulation, and I 'm wondering if there was a way to get head orientation and/or position when we use VR ? Because I found some variables about that, but it's only setters, not getters ...

    Have a nice day,

    Dalfrak

    Have a nice day,

    Dalfrak

  • If you are using the touch or vive controllers (VR Hands) you can re-center your view by pressing the menu button on the controller SEE HERE

    You can also bind the 'reposition view in VR' to any key or button of not using the motion controllers to fly.

    IPACS Development Team Member

    I'm just a cook, I don't own the restaurant.
    On behalf of Torsten, Marc, and the rest of the IPACS team, we would all like to thank you for your continued support.

    Regards,

    Jeff

  • Thank you for your reply.

    I already checked the wiki, and I already bound this key. That was not really my question btw. I wanted to ask if I could gather head position and/or orientation (both would be the best) with the external_dll from the SDK, like I'm gathering longitude, latitude, altitude, speed ... with the tools provided by this DLL.

    I don't know if my question was clear, I'm french and I don't even know how to clearly explain my problem in french ^^'


    Have a nice day,

    Dalfrak

    Have a nice day,

    Dalfrak

    Edited 3 times, last by Dalfrak (April 27, 2018 at 9:05 AM).

  • Dalfrak,

    yes, this is possible, but its not officially documented as you can break the simulator with it if you do anything wrong here:

  • Thank you !! That's exactly what I was searching for ! :)

    Now I have one more question about the vr_head_orientation_quaternion variable.

    vr_head_orientation_quaternion is a quaternion, so it has a r, a x, a y and a z attribute. Could you (or someone else) explain me what is the r attribute ?

    I guess the x, y and z are attributes of a tm_vector3d, but I don't know why there is a tm_vector3d here.

    I mean, maybe the r attribute is the rotation around the vector, but why only one vector ?

    Have a nice day,

    Dalfrak

    Have a nice day,

    Dalfrak

    Edited 5 times, last by Dalfrak (April 27, 2018 at 5:23 PM).

  • Hi, and thank you for your reply. I already checked Wikipedia, don't worry. But I asked for it in order to, maybe, have a simpler explanation. Because Wikipedia is great, I agree, but it's sometimes really difficult to understand when you're searching for specific terms (like quaternion). At least I tried. :)

    Have a nice day,

    Dalfrak

    Have a nice day,

    Dalfrak

  • Hi, and thank you for your reply. I already checked Wikipedia, don't worry. But I asked for it in order to, maybe, have a simpler explanation. Because Wikipedia is great, I agree, but it's sometimes really difficult to understand when you're searching for specific terms (like quaternion). At least I tried. :)

    Have a nice day,

    Dalfrak

    The quaternion's x,y,z is the endpoint of a vector that points out from the origo of the 3D coordinate system. This will give you the orientation of the 3D object. Now, the r is the angle that the object is rotated around the vector.

    Like if you were cooking a marshmallow on a broach. you are the origo, the end of the broach is pointed at x,y,z and r is how you turn the broach to cook the marshmallow evenly at all sides. :)

    Best Regards

    Balazs

    Ryzen 2700X, HyperX 32GB, 2060 Super 8GB, win10/ubuntu19

    Saitek X52 HOTAS, Logitech G920 pedals

    freetrack/opentrack
    X-Plane 11, DCS modules: A-10C, Ka-50, FC3, Mirage 2000C, F/A-18C, Persian Gulf

  • Let's give credit where credit is due: I've heard this example in the 3D engine programming videos of 'thebennybox' on youtube. ^^

    Best Regards

    Balazs

    Ryzen 2700X, HyperX 32GB, 2060 Super 8GB, win10/ubuntu19

    Saitek X52 HOTAS, Logitech G920 pedals

    freetrack/opentrack
    X-Plane 11, DCS modules: A-10C, Ka-50, FC3, Mirage 2000C, F/A-18C, Persian Gulf