View Full Version : rotation and axis alignment problems

04-13-2004, 01:45 AM
hi, i have got lib3ds working and can now load 3ds files.

my problems are

1. 3ds uses different default axis alignment, is the best way to get correct alignment to use a simple rotate function before drawing the object, or is there a way to change the default opengl axis ?

2. I want user to use the mouse to drag across the screen to rotate the onscreen object. eg drag horizontal = rotate the object in x direction(ie rotate around the y axis), doing this with rotate command leads to problems, once the model is rotated from its default position. Eg once moved the y axis no longer points "up". How can i still rotate the object in the X direction + or - when the Y axis no longer points up as per default. As i have it the mouse movements rotate the object around its local axis, which can result is reverse rotations to the mouse movement depending on how the axis are currently aligned

Any help im desperate please

04-13-2004, 09:56 AM
spooky, that is a pesky problem. Tell me, what is the default orientation when you import a model. That is, if you were to name the world vectors: x_axis = "forward", y_axis = "left", z_axis = "up", what would the vectors be for your world, and what are they for the model?