Sign in to follow this  
cutovoi

Rotation in 3ds model(very strange solution)

Recommended Posts

cutovoi    122
Hi fellows I have an app that loads, rotates and translates a 3DS model. All the 3 functionalities works, but to solve the rotation, I didn't like the solution. I explain: I created a header file that does the rotation and the translation functionalities. Works? Works well. My problem is that when I load a model that doesn't be in the origin axis coordinates of the 3DMax plane, the object rotates in the origin axis. It seems that the object translates in the X-axis and in the Z-axis. More, when I rotate in the X axis, the objects don't rotate in relation of their center, it rotates in relation of coordinate X of the 3DMax plane(that is 0). My solution for this was I put the object a half down in the 3DMax plane. In my code of drawing the 3D object, I'm doing premultiplying. I put the picture below about what I have done to work. The picture is the 3DMax plane: 3DMax plane with my model Then works fine. If I put the object in any other part of the 3Dmax plane, things go crazy. This solution for me is VERY UGLY. What I want is to make this programatically. I doesn't matter what the position of 3D object. I want to rotate the local coordinates of the model, not the 3DMax plane coordinates. What I need to do? Any, any help is welcomed. I don't know what direction I need to take. Please help me in this task.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this