|
|
Hello!
How can I rotate an object around its center?
I currently use
Rotate_Around_Trans( < 0, 90 , 0 >, < x1, 0.4, y1 > )
with
#include "transforms.inc"
but I don't think it's working.
Does the expression
< 0, 90 , 0 >
mean rotate around y for 90 degrees (and leave x and z as is)?
Because that's what I want to do.
Please tell me whete my current code is wrong or
how to do it.
Thanks!
Greetings,
Chris
Post a reply to this message
|
|
|
|
Chrisir nous illumina en ce 2008-05-19 12:51 -->
>
> Hello!
>
> How can I rotate an object around its center?
>
> I currently use
>
> Rotate_Around_Trans( < 0, 90 , 0 >, < x1, 0.4, y1 > )
>
> with
>
> #include "transforms.inc"
>
> but I don't think it's working.
>
> Does the expression
> < 0, 90 , 0 >
> mean rotate around y for 90 degrees (and leave x and z as is)?
>
> Because that's what I want to do.
>
> Please tell me whete my current code is wrong or
> how to do it.
>
> Thanks!
>
> Greetings,
>
> Chris
>
>
>
>
Acording to the documentation, you are correct.
That macro operate by translating the object by -1*< x1, 0.4, y1 >, rotate it by
the amount wanted, then translate it back to it's original location.
If the point provided is outside the object, then the object will orbit that point.
As Jim mentioned, it's usualy way easier to create all your objects around the
origin, apply any desired scaling and rotation, then to translate them to the
desired location.
Depending on the orientation of the camera and the location of your object(s),
it's possible that the applied rotation don't look like what you expect, even if
it did exactly what it should.
--
Alain
-------------------------------------------------
I hope our wisdom will grow with our power, and teach us, that the less we
use our power the greater it will be.
Thomas Jefferson
Post a reply to this message
|
|