What do you mean lights dont change when you move their transformgroup?

Pointlights certainly do, I'm not sure about other types.

-ben

-----Original Message-----
From: RWGRAY [mailto:rwgray@;RWGRAYPROJECTS.COM]
Sent: 01 November 2002 16:26
To: [EMAIL PROTECTED]
Subject: [JAVA3D] Moving Lights


I have a sphere in my scene.  I put a point light in the center of the
sphere.  I want to  move the sphere/pointlight (a glowing orb) around in the
scene.

Since light positions don't change when a transformgroup's transform
(location) is changed, how do I keep the light within the sphere as the
sphere is moved?

The sphere is attached to a sequence of transformgroups.  For example:
TG_Rotate(orbit)->TG_Translate->TG_Spin->TG_Scale->Sphere

Seems like I need to have some event such that whenever *any* of the
multiple transformgroups change their transforms that an event handler is
called to change the location of the pointlight.

Is that how you do it?

Does anyone have an example of coding this?

Is there another way I can do this?  (Would love to simply attach the
pointlight to the TG_Scale in the above example, but that doesn't work.)

Cheers,
Bob Gray

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