Also if you need to update your camera you could use a SpringCam to
follow the plane

or do it yourself
1- copy the plane's transform to the camera's (it will be where the
plane is and have its rotations):
camera.transform.matrix3D = plane.transform.matrix3D.clone();

2 - offset it's position to be behind the plane so you can see the
model (if needed):
camera.transform.matrix3D.prependTranslation(0, offsetY, offsetZ);

3 - offset rotation to look either above or below the plane as wanted:
camera.transform.matrix3D.prependRotation( rotationOffset,
Vector3D.X_AXIS );

The code above was taken or inspired by the SpingCam, but I used it
for an Away3D Lite project.

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