Wolfgang,
Any VRML sensor will activate when any of its siblings or their children are
sensed on. So the actual object that got TouchSensor
response is not as important to the VRML implementation as the group that
it was in. This is especially true for the drag sensors, which need
the transform of the parent group to calculate the rotation for example,
as well as the localToVworld of the actual object.
To do what you are talking about, you will need to modify the vrml
code to do something with the SceneGraphPath of the object picked.
The case for drag sensors is easy since the drag sensor needs the
SceneGraphPath object, and in the callback method this is passed to
the sensor. The TouchSensor is a separate case though, and no path
is sent, but you can get to it from the picking method in the main
browser Behavior.
--
Rick Goldberg
Sun Microsystems
>Date: Tue, 09 Mar 1999 07:52:15 +0100
>From: Beer Wolfgang <[EMAIL PROTECTED]>
>X-Accept-Language: en
>MIME-Version: 1.0
>To: Java3D Mailing-List <[EMAIL PROTECTED]>
>Subject: [java3d] Touch Events
>Content-Transfer-Encoding: 7bit
>
>Hi!
>
>In VRML i can use a TouchSensor to get an event out of the
>scene. How can i get an identifier of an object in Java3D when
>i pick it with a mouseclick????
>
>please help me!
>
>mfg
>Wolfgang
>
>=====================================================================
>To subscribe/unsubscribe, send mail to [EMAIL PROTECTED]
>Java 3D Home Page: http://java.sun.com/products/java-media/3D/
=====================================================================
To subscribe/unsubscribe, send mail to [EMAIL PROTECTED]
Java 3D Home Page: http://java.sun.com/products/java-media/3D/