0

I am trying to convert from UE4 coordinates (Z up) to opengl coorinates (Y up) but I cant seem to get around it.

I do this Matrix transforming from X+ right, Y+ up, Z- deep to Y+ right, Z+ up, X+ deep [mat = M]

 0  1  0  0
 0  0  1  0
-1  0  0  0
 0  0  0  1 

But I end up getting the wrong result and also the rotation....

I get ActorTranfrom from (T) = this->GetTransform()

then FTransform R = T * M

Then I do the R - ToMatrixWithScale() - then get send it to OpenGL backend.

But the orientation is wrong... What am I doing wrong ?

Appu Newbie
  • 123
  • 9
  • There is no such thing as "OpenGL coordinates". YOu set up whatever coordinate systems you like by using the appropriate matrices. – derhass Nov 20 '20 at 12:56
  • I am trying to do this -- X+ right, Y+ up, Z- deep to Y+ right, Z+ up, X+ deep – Appu Newbie Nov 20 '20 at 13:07

0 Answers0