Dts render orientation problem
by Frank Korf · in Torque Game Engine · 07/23/2007 (4:10 pm) · 5 replies
I have a model of a ball. I am using a quaternion to store its orientation, Whenever I rotate it, it rotates the model about the bottom center of the model, and not the model's center in object space. How do I rotate the model about its center, instead of what appears to be its base point?
#2
Just to be clear, the model is rotating out of its box.

I just want the model to rotate about the center of the model, not the center point at the base of the model.
07/24/2007 (8:35 am)
The center of the ball model in 3DSMax is (0,0,0).Just to be clear, the model is rotating out of its box.

I just want the model to rotate about the center of the model, not the center point at the base of the model.
#3
Try this: place any object (I used a RigidShape) in the world editor.
Then, try these rotations:
"1 0 0 180"
"0 1 0 180"
"0 0 1 180"
While rotating about the Z axis simply spins the model about its center, rotating about the X or Y axes spins the model about a the bottom center of the model. Also, "position" defines the bottom center, and not the model center.
Any thoughts?
07/24/2007 (10:18 am)
So I solved the problem with the ball moving out of its box, but I did not solve the rotation issue. Try this: place any object (I used a RigidShape) in the world editor.
Then, try these rotations:
"1 0 0 180"
"0 1 0 180"
"0 0 1 180"
While rotating about the Z axis simply spins the model about its center, rotating about the X or Y axes spins the model about a the bottom center of the model. Also, "position" defines the bottom center, and not the model center.
Any thoughts?
#4
Not trying to be an ass here, but if you want people to spend their time helping you, then you might wanna share the solutions you find. That's the whole point with a forum, you know. Again, no offence - and good luck. Wish I knew what was going on.
07/24/2007 (10:22 am)
Quote:
Frank Korf said:
So I solved the problem with the ball moving out of its box [...]
Not trying to be an ass here, but if you want people to spend their time helping you, then you might wanna share the solutions you find. That's the whole point with a forum, you know. Again, no offence - and good luck. Wish I knew what was going on.
#5
07/24/2007 (10:58 am)
I was storing the orientation separate from mObjToWorld. Then, I would use the orientation variable to update the render transform and not the standard transform. This meant that the object box did not line up with the mesh.
Associate Jeff Faust
Faust Logic, Inc.