[SOLVED] Forward vector - negative z

Hi folks,

I’ve been wondering about PlayCanvas, why is the forward vector negative z? It seems a bit backwards to me, as Camera direction, Light direction, and lookAt function etc. all point in the “opposite” direction.

Should I just accept that as the PlayCanvas norm? Model my assets to face towards negative z and such? Or otherwise be in a world of bother… :stuck_out_tongue:

PlayCanvas uses a right handed coordinate system as that was the decision made years ago and cannot be changed without breaking everything.

I think this was based on Maya at the time which was also right handed.

Usually 3D modelling packages will have export options to set which direction Z should be in.

Thanks for the reply, Steven :slight_smile:

My brain is too feeble to fully understand the implications of handedness in coordinate systems and all the consequences.

Maya was probably a good choice for reference, as I believe it has been THE 3D package for games for many years! I’m using Blender, and it definitely has export options for UP vector. Might have for FORWARD too.

It’s just confusing to me how a camera looks like this, pointing in the “opposite” direction :sweat_smile:


Probably best to just “play along”

There’s a forward option here for FBX. Not sure if they have one for glTF export though

Doesn’t look like it.


Oh well :slight_smile: I’ll manage

Just realized, directional lights point along their negative Y. This is getting more and more interesting :smile:


Yeah, that I can’t explain :person_shrugging: @will?

That decision was made because I think Max or Maya did that for a default directional/spot light back when I wrote the lighting code in the engine. Because lights, y’know, tend to point downwards. :smile:

What a wonderfully consistent world computer graphics is! :rofl:

I repent my nosiness! I shall obey, lest the pillars of the world collapse :pray: