mathx

07-14-2001, 03:10 AM

Hello,

Ok, I've been coding for a couple of weeks, but so far this is the toughest problem I've faced. When I create an object (let's say a cube) on the center of the world, and I rotate it, all functions very well. But when I create it let's say on the left of the world, it rotates around the world's axis, not around the object's axis. I've came up with 2 solutions: create all objects on the center, rotate them and translate for the position, or do some calculations, multiply a certain matrix to the current one, and rotate only the object. Is this right? Is there another solution?

Thanks,

Matheus.

Ok, I've been coding for a couple of weeks, but so far this is the toughest problem I've faced. When I create an object (let's say a cube) on the center of the world, and I rotate it, all functions very well. But when I create it let's say on the left of the world, it rotates around the world's axis, not around the object's axis. I've came up with 2 solutions: create all objects on the center, rotate them and translate for the position, or do some calculations, multiply a certain matrix to the current one, and rotate only the object. Is this right? Is there another solution?

Thanks,

Matheus.