The Author Online Book Forums are Moving

The Author Online Book Forums will soon redirect to Manning's liveBook and liveVideo. All book forum content will migrate to liveBook's discussion forum and all video forum content will migrate to liveVideo. Log in to liveBook or liveVideo with your Manning credentials to join the discussion!

Thank you for your engagement in the AoF over the years! We look forward to offering you a more enhanced forum experience.

import-bot (20211) [Avatar] Offline
#1
[Originally posted by goranth]

Hello Jon,
first of all, thankyou for a very interesting and well written book!

I have tried to extend the CameraNavigating example a little.
An event thread is getting new translation and rotation(roll, pitch and yaw)
values by continously calling an airplane simulation process.

These new values are pushed to the method updateActuation for the flyCamera's
SVTransformGroupPlugin resp. MMTransformGroupPlugins. The debug logg shows
that the plugins are called with simulation values.

The problm: No rotation(roll, pitch or yaw) of the airplane have been observed
in the views. I can only observe a translation of the airplane over the earth.


Do you have any clues or tips on what could be wrong?

Best regards, Goran
import-bot (20211) [Avatar] Offline
#2
Re: CameraNavigating:
[Originally posted by author]

This might be stating the obvious, but the first thing that comes to mind from
your description is that perhaps the camera and airplane model are attached to
the thrust actuator instead of the attitude actuator of the fly camera. This
would result in the plane and view translating but not rotating.

Another possibility comes to mind if you are trying to perform drags instead
of just setting the state of the actuators. With drags you have to be careful
as to how they start and stop, and whether or not accumulation is enabled.

This one is a long shot, but see if using initActuation() instead of
updateActuation() makes a difference. I seem to recall that rotations can be
sensitive to this since they are relative to the target object state.

One more thing popped into my mind. Don't forget to establish the axis of
rotation for the AxisAnglePlugins. As noted in the javadoc, the X, Y, and Z
designations are arbitrary, and the rotation axis is specified in the
actuation state. If you look in the FlyCameraControl class, the
DrmRotationMapper is doing this for you. If you look at some of the early
examples you'll also see the axis angle being set to a constant using the
actuator offset.

This is not much but I hope it helps.

--jon

> Hello Jon,
> first of all, thankyou for a very interesting and well written book!
>
> I have tried to extend the CameraNavigating example a little.
> An event thread is getting new translation and rotation(roll, pitch and yaw)
> values by continously calling an airplane simulation process.
>
> These new values are pushed to the method updateActuation for the flyCamera's
> SVTransformGroupPlugin resp. MMTransformGroupPlugins. The debug logg shows
> that the plugins are called with simulation values.
>
> The problm: No rotation(roll, pitch or yaw) of the airplane have been observed
> in the views. I can only observe a translation of the airplane over the earth.
>
>
> Do you have any clues or tips on what could be wrong?
>
> Best regards, Goran