Orientation Issue with exporter

The place for artists, modellers, level designers et al to discuss their approaches for creating content for OGRE.
Post Reply
DigitalGhost
Halfling
Posts: 62
Joined: Mon Feb 07, 2005 9:47 pm

Orientation Issue with exporter

Post by DigitalGhost »

In 3dsmax, the "front" of an object is in the -y direction. You can tell beacuse the front viewport points in the -y direction. In ogre3d, front is in the +z direction (which is the +y direction after you flip y/z).

I actually prefer forward as being +y, is there a way to change 3d studio max so that "front" goes in the +y direction?

If I can't do that, can I define an entity's orientation at runtime in ogre3d?
User avatar
sinbad
OGRE Retired Team Member
OGRE Retired Team Member
Posts: 19269
Joined: Sun Oct 06, 2002 11:19 pm
Location: Guernsey, Channel Islands
x 67
Contact:

Post by sinbad »

There is no 'front', the exporter just exports the mesh in it's original orientation. Just rotate the node your entity is attached to however you like, and interpret 'front' however you choose.

If you're talking about the meaning of 'yaw', 'pitch' and 'roll', these are expressed in the local space of the node. If you consider 'roll' to be a rotation around the Y axis, then you should use the more verbose rotate() methods which yaw() maps onto anyway and specify your own axis of rotation. As for methods like 'lookAt' and 'setDirection' on nodes, those take a parameter identifying the node content's 'natural' facing.
DigitalGhost
Halfling
Posts: 62
Joined: Mon Feb 07, 2005 9:47 pm

Post by DigitalGhost »

OK, I was trying to use the autofacing function so that my characters are always facing each other and they circle-strafe around each other.

I changed this:

player->setAutoTracking(true,(SceneNode *)mSceneMgr->getRootSceneNode()->getChild("sphere_guy0"));

into this:

player->setAutoTracking(true,(SceneNode *)mSceneMgr->getRootSceneNode()->getChild("sphere_guy0"),Vector3::UNIT_Z);

now I'm facing the target at all times, but it seems like the positive x direciton goes left, when it should go right.
Post Reply