[osg-users] Trouble with transitioning to OSG
Jan Ciger
jan.ciger at gmail.com
Thu Jun 25 05:39:04 PDT 2015
On Thu, Jun 25, 2015 at 12:29 AM, sam <brkopac at gmail.com> wrote:
> I thought that would be taken care of when I do:
>
> auto pos = osg::Vec3(relPos[0], relPos[2], relPos[1]);
>
> That should swap the Z accordingly? Or am I missing the boat on this one.
Your matrices you using to assemble the bones need to be converted too.
The simplest way to deal with this is to put a rotation transform at
the root of the scenegraph and attach your nodes to it instead of the
root. That will effectively change the coordinate system from the OSG
z-up to your y-up and you keep working in your y-up coordinates. If
you start converting the coordinate systems vector by vector then you
will have to change all the matrices too - fairly error prone if you
have a larger codebase.
J.
More information about the osg-users
mailing list