PlayCanvas vs Unity3D quaternion conversion

Hi, I’m creating an application that loads dynamically/interactively Position and Rotation for the object from a text file.

The point is: I have all coordinates setup on external 3D software, but when I simply use the same exported coordinates (from Unity) to Playcanvas all gets very twisted.

I understand this might be related to quaternion conversion because of the different axis orientations… so I managed to adapt a spreadsheet to convert Unity3D euler angles to Playcanvas euler angles with quaternions in the middle for the conversion. I can get the good angles when the input is (X;0;0), (0;Y;0) and (0;0;Z), but when all 3 parameters change I can also get the 3 correponding angles, but it’s messed up, example: I have to change X with Y or find which ones should be negative… I’m very close, but missing something in this axis conversion yet.

I realize also that Playcanvas zeros out all coordinates on import, so there might be a conflict in this as well, but I’m really confused on how to compatibilize and migrate coordinates from Unity to Playcanvas. It’s been very difficult to create a consistent working method for all angles.


Quaternion spreadsheet (yes, there is a excel macro for the complex calculations):

Please help out! In need to deliver our MVP at a trade show next week and this is lagging so much!!!

In a nutshell, are you trying to convert from a left handed co-ordinate system to a right handed one? This may help? http://answers.unity3d.com/questions/503407/need-to-convert-to-right-handed-coordinates.html

(I don’t have Excel so I can’t see the sheet)

Edit: Okay… Just trying it out for myself and it’s not as trivial as I thought it was… I give it another try a bit later

Hey @Francisco_Toledo did you ever figure this out?

Hi @Francisco_Toledo,
@yaustar
the similar issue i am facing, actually i am fetching coordinates values from unreal engine in a json format so that i can animate means lerping to my entities based on “position” and “rotation” performing in playcanvas

All things looks perfect but in rotation it didnt show same as my unreal. even @yaustar and leonidas told be in playcanvas we would convert the “cm to m”. unreal is left-handed, and PlayCanvas is right-handed. also i have convert that. but failed to getting same result

did you find any solution/ guidance plz help

Thanks