Hello, Well, I tried to detect collision between Groups containing the Vrml objects. It works!!! I'm using CollisionDetector.java of TickTockCollision example. But, the parameters is not Shape3d. I'm using Group. Source Code of Collision Detector:
public class CollisionDetectorGroup extends Behavior { private boolean inCollision = false; private Group group; private WakeupOnCollisionEntry wEnter; private WakeupOnCollisionExit wExit; private Object userdata; public CollisionDetectorGroup(Group gp) { group = gp; userdata = group.getUserData(); inCollision = false; } public void initialize() { wEnter = new WakeupOnCollisionEntry(group); wExit = new WakeupOnCollisionExit(group); wakeupOn(wEnter); } public void processStimulus(Enumeration criteria) { inCollision = !inCollision; if (inCollision) { System.out.println("userdata de Objeto em colisão: " + (String)userdata); wakeupOn(wExit); } else { System.out.println("userdata de Objeto que saiu de colisão: " + (String)userdata); wakeupOn(wEnter); } } } And applying Collision Detector to a TransformGroup that contains the BranchGroup of VRML object. CollisionDetectorGroup cdGroup = new CollisionDetectorGroup(Trans); cdGroup.setSchedulingBounds(bounds); And Finally, adding cdGroup( the CollisionDetector) to parent(TGFirst) of Trans. TGFirst.addChild(cdGroup); If there's another solution , forward, ok? Thanks, Melina --- Melina Alberio <[EMAIL PROTECTED]> wrote: > Hi, > I need to detect collision between Vrml Objects. > Could > someone help me please? > Thanks, Melina > > > > __________________________________ > Do you Yahoo!? > Yahoo! Small Business - Try our new resources site! > http://smallbusiness.yahoo.com/resources/ > > =========================================================================== > 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". > __________________________________ Yahoo! Mail Mobile Take Yahoo! Mail with you! Check email on your mobile phone. http://mobile.yahoo.com/learn/mail =========================================================================== 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".