Skip to main content
New Participant
March 31, 2015

scale issues

I am trying to retrofit the rift to some opengl applications

I am setting the projection matrix like so

Vector3f headTrack(m_eyeRenderPose[eye].Position); // need to scale

Matrix4f MVPMatrix = Matrix4f(ovrMatrix4f_Projection(m_eyeRenderDesc[eye].Fov, -myNear, -myFar, true)) * Matrix4f(Quatf(m_eyeRenderPose[eye].Orientation).Inverted()) * Matrix4f::Translation(-headTrack);

The problem is, some of the apps are using for example a near clipping plane of say 500 or 1000 with objects draw with very large scales
The head or eye position needs to be scaled to match.
How can I do this? What is the correct maths.

    2 replies

    Inspiring
    March 31, 2015
    Can you scale your world/objects? I believe the scale is supposed to be 1 unit = 1 meter (at least in Unity).
    AMD Ryzen 7 1800X | MSI X370 Titanium | G.Skill 16GB DDR4 3200 | EVGA SuperNOVA 1000 | Corsair Hydro H110i Gigabyte RX Vega 64 x2 | Samsung 960 Evo M.2 500GB | Seagate FireCuda SSHD 2TB | Phanteks ENTHOO EVOLV
    dukeyAuthor
    New Participant
    March 31, 2015
    I am not using unity, and scaling the world will introduce normal scaling issues.