Cannot convert Rigid3D rotation_xyzw to rotation in unity camera

Hello everyone, I face a problem when converting rotation_xyzw of Rigid3d to rotation in Unity. I have constructed a model using pycolmap as below image

, when i input an image, model will return a translation and rotation like this Rigid3d(rotation_xyzw=[0.355462, 0.0381408, 0.933093, 0.0391096], translation=[-10.0555, 15.4998, -9.756]). I sucessfully got the position for camera used in unity with the code


but many tries for rotation is not working.

Thank u in advance for any helps and cmt for ideas.

Unity uses a left-handed coordinate system. If you are importing data from a right-handed coordinate system, you need to convert to left-handed coordinates. (I don’t know what Rigid3d is, but this is my guess as to what is causing your issue.)

1 Like