The terminology rotate seems to always confuse people.

If you rotate an object, or a group of objects, it should rotate the object
around the upper most point in the hierarchy of the Transform group where
you have the behavior acting upon.

In your case if TG1 is at 0,0,0 and you rotate, then everything works fine.
if TG1 is at 2,0,4 and you rotate, then everything works fine provided you
want to rotate with the center of the rotation at 2,0,4.

I believe what you want to do is to ORBIT a point other than the transform
(position) of your TG1 TransformGroup.

You can do what you said in your solution "1".

You can also check out my modified behaviors at:
http://www.sigda.org/Eric/java3d/behaviors/index.htm
and pay particular attention to the MouseOrbit behavior.

Instead of telling it the viewers position, you could pass some other 3D
coordinate to ORBIT around.

At 03:38 PM 01/05/2001 +0000, you wrote:
>Hi
>
>I've now managed to get a couple of objects grouped correctly,
>scaled and rotating in unison (Thanks Fred Klingener for your help..
>I did have trouble link Transform groups btu now I know th order in
>which to do this all is fine) but how do I rotate this group around
>a set axis.
>
>ie. I have something like this
>
>universe
>locale
>|-BG1
>   |-TGc
>     |- view ("camera")
>   |-TG1
>     |-TG2
>       |-Cube1
>     |-TG3
>       |-Cube2
>
>If I rotate the group of objects using TG1 then they always rotate around
>the global axis (0,0,0). How do I get them to rotate around another piont
>somewhere else in the universe (ie 2,0,4 for instance). Is there any easy
>way to achieve this or do I need to do any of the following.
>
>1: Move the group to 0,0,0, rotate them and then move them back to
>where they were
>
>or
>
>2: Move the camera instead and "fudge" the view so they look like they
>are rotating around a different point.
>(maybe easier but I don't know how to do this or even if this is possible)
>
>Thanks again for all your help everyone..
>
>At least I'm getting there and can see the light at the end of the tunnel.
>
>Cheers
>
>Andy Knight
>Software Engineer
>Syngenta
>
>===========================================================================
>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".

===========================================================================
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".

Reply via email to