Page 1 of 1

[SOLVED]Rotation about the center of a mesh

Posted: Sun Feb 06, 2011 9:43 am
by wsw1231
How to set rotation of an object about its center or about one specific point?

Posted: Sun Feb 06, 2011 1:47 pm
by wsw1231
I ask this question because the rotation looks strange when I rotate an imported object.

Posted: Sun Feb 06, 2011 8:40 pm
by Radikalizm
What do you mean by 'the rotation looks strange'?

The model you imported probably didn't have its center at the scene origin, so it will rotate around its relative origin inside irrlicht

Posted: Sun Feb 06, 2011 11:46 pm
by bitplane
You could add the node to a dummy transformation node or even transform the vertices manually, but as Radikalizm said it's probably better to just move the mesh in an editor and save it again.

Posted: Mon Feb 07, 2011 3:59 am
by wsw1231
Radikalizm wrote:What do you mean by 'the rotation looks strange'?

The model you imported probably didn't have its center at the scene origin, so it will rotate around its relative origin inside irrlicht
How should I adjust the position of the center of the mesh to the scene origin in 3DS MAX?

Is there any better way to do that other than using 3DS MAX?

Posted: Mon Feb 07, 2011 4:05 am
by Radikalizm
wsw1231 wrote:
Radikalizm wrote:What do you mean by 'the rotation looks strange'?

The model you imported probably didn't have its center at the scene origin, so it will rotate around its relative origin inside irrlicht
How should I adjust the position of the center of the mesh to the scene origin in 3DS MAX?

Is there any better way to do that other than using 3DS MAX?
Just set x, y and z components of the position vector of your mesh to 0 in max, or depending on the mesh, you can set the z value so the base of the mesh is at 0 (the z-axis in max is the same as the y-axis in irrlicht)