Re: [Plib-users] ssg camera woes / tranformation/coordsystem confusion
Brought to you by:
sjbaker
From: <coz...@gm...> - 2006-02-12 20:48:57
|
> > Hi. I have some pre-SSG/own code, I'm trying to migrate to SSG. > However, my camera code screws up; it's as if the axes are switched, or > worse. > > For example, my code has a direction/rotation matrix, that indicates > the users' rotation around the y axis (it could be a rotation angle > instead, > but I'm exploiting that it's a matrix). > > However, when I multiply this matrix onto the ssg camera, it rotates > around > the _Z_ axis instead! > Similar problems happen with other parts of the transform (which I've > commented out to dissect the problem). This is a quote from a page at Steve Baker's tuxkart site at http://tuxkart.sourceforge.net/trackdesign.html : "I come from a flight-simulation background where we use the convention tha= t Z-is-up - so all my software works like that. However, the PLIB loaders kno= w that some modellers use Y-is-up and do the axis swap as needed. Hence, in AC3D, Y-is-up - but in the game, your models will be converted to Z-is-up. If you find this confusing, forget I mentioned it - everything comes out OK automagically." So I would beleive the Z axis is the Y axis are swapped in plib, so just swapping these values when you load models and in your coordinate handling code would do the trick. -Coz |