Hi Choons,

You are experiencing the Radians to Degrees funk. Internally flash and
Away3D handle rotations in radians and rotationZ just returns that
value by doing radians * (180 / Math.PI) and that won't return the
range you are after.

Not sure there is a built in way to get a 0 to 360 value. You could
cache your own value and increment/decrement it as needed.

Cheers,

J.

On Jun 12, 11:04 pm, Choons <[email protected]> wrote:
> I'm a little confused by the pitch, roll, yaw system and the values I
> get back tracing rotationX Z and Y. I've got an Object3DContainer with
> an airplane model in it. The container is aligned with the global axis
> system. I'm constraining it to only roll (rotation around local z
> axis) in a counter-clockwise direction. I'm monitoring the rotationZ
> property of the container.
>
> The rotationZ values go 0 -> +90 then -90 -> 0 then 0 -> +90 then -90 -> 0 
> for a full rotation when using roll on the container. In contrast,
>
> if I set the rotationZ value directly I get
> 0 -> 360 for a full rotation. Since local and global axes are aligned
> I'm wondering why there is a difference. The values I get when using
> roll are a pain in the ass because it's ambiguous- I get the same
> value twice on each rotation.
>
> I want to use roll because I can pair it with pitch to make the
> airplane do a very natural banked turn, but need to monitor global
> rotation for my camera. Is there a setting that forces a 360 degree
> system on the roll method?

Reply via email to