cancel
Showing results for 
Search instead for 
Did you mean: 

scale issues

dukey
Honored Guest
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 2

cybereality
Grand Champion
Can you scale your world/objects? I believe the scale is supposed to be 1 unit = 1 meter (at least in Unity).

dukey
Honored Guest
I am not using unity, and scaling the world will introduce normal scaling issues.