PlayCanvas defines Z-axis as backwards and X-axis as right.
But glTF defines Z-axis as forwards and X-axis as left.
Both are right-ended systems. So can I just use the glTF definition?
Is there any code inside PlayCanvas that relies on the Z = backwards / X = right definition?
I prefer the glTF definition because all our models are made that way.
I know I can just rotate the models 180 degrees, but then I need to do that each time we calculate new positions for the models. I prefer cleaner code that just can set orientation as it is.
I don’t think that’s something you can easily change since it’s being used all over the engine and the editor.
Thinking if you could patch/add a utility method somewhere that can automatically do that for you, at least on runtime.
@mvaligursky @yaustar any idea?
Well, I can live with the fact that I have to do it each time when updating the orientations. But it would be cleaner (in my case) if I hadn’t to do that.
Maybe you can add addition node as a parent of each of your objects, and apply the rotation there.
But personally, to keep problems to a minimum, I’d just use a system that the engine provides.
Tanks for advice.
I adapted all my code for the PlayCanvas coordinate system. Cleaner and indeed probably less problems to expect.