Excuse
the sketchy details, but I can point you in the right direction (I
think).
Ultimately, the translation / rotation etc. is encapsulated in a single
Transformation between Local and World Coordinate Systems. This single
Transformation, however, is obtained by traversing the scene graph from the
root, all the way to your ship, and multiplying together all the Transform3Ds
found along the way.
This
is just normal maths - you can combine transformations represented by matrices,
by performing matrix multiplication. However - Matrix multiplication is not
commutative, which means that A x B does not equal B x A in general. i.e. a
rotation followed by a translation is not the same as a translation followed by
a rotation.
Could
it be that you are post-multiplying your transformations, when it should be a
pre-multiplication, or vice versa? I don't know whether you are even explicitly
separating out your translation and rotation in the scene graph. If not, I
probably would change it so that you are. It makes it easier conceptually, and
Java3D will probably optimise it at runtime anyway, so you don't have to worry
about an overhead.
Try
parenting your ship with a Transform3D which is a rotation, and parenting that
with a Transform3D which is a translation. (I might have that the wrong way
round. If so - swap the rotation and the translation!).
Then,
you can change your rotations and translations independantly by setting the
corresponding Transform3D.
Hope
this helps.
Lewis.
=========================================================================== To unsubscribe, send email to [EMAIL PROTECTED] and include in the body of the message "signoff JAVA3D-INTEREST". For general help, send email to [EMAIL PROTECTED] and include in the body of the message "help". |
<<image001.gif>>