# Billboard in left-hand coordinate system

This topic is 3604 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

## Recommended Posts

I'm pretty new with openGL and all the 3D stuff and never been good with geometry even in 2D so my question might seems stupid. Seems the program I'm working with is using a left-hand coordinate system. So the result is of course no good. I don't really know how to change everything to match a left-hand coordinate system. Should it be a sign change somewhere? Also if it's only that, should I have a billboard facing a direction, but just not the good one? Because the result I got is worst then that! Thank you very much!

##### Share on other sites
In general conversion between left-handedness and right-handedness means to mirror an axis. The operation is a multiplication with a matrix that inverts the axis, e.g. build from a non-uniform scaling matrix
S(1,1,-1)
which means to scale the x and y axes by 1 (i.e. doing nothing) but the z axis by -1 (i.e. to invert it). The corresponding OpenGL invocation is
glScalef(1,1-1);

If all the world should be left-handed it would be sufficient to use this matrix as the very first matrix on OpenGL's MODELVIEW matrix stack when initializing rendering. If the world is right-handed but imported models are not, or imported animations are not, then the things become a bit more complicated. Furthurmore, the "program" you mention may have another assigment of the x,y,z axes, too, so an additional rotation may be needed. Perhaps you need the mirroring about another axis than z. Perhaps ...

So the problem is required to be investigated in more detail if the above principle description isn't sufficient for you. Then start e.g. with the assigment of the up, forward, and side vectors to the x, y, and z vectors in both the program and the wanted set-up.

##### Share on other sites
thank you very much!

1. 1
2. 2
3. 3
Rutin
17
4. 4
khawk
14
5. 5
frob
12

• 9
• 11
• 11
• 23
• 12
• ### Forum Statistics

• Total Topics
633660
• Total Posts
3013218
×