i solved the problem by setting user data
          colReporter.setUserData("Checkpoint: "+(++num));

on the 'gate' object. When collision occurs, u just retrieve the data
from the node:

          Node trigObj = trigPath.getNode(trigPath.nodeCount()-1);
          Object userData = trigObj.getUserData();
          if (userData != null)
          {
            if (userData instanceof String)
            {
              String info = (String)userData;
              if (info.startsWith("Checkpoint:") && !info.equals(""))
              {
                int i = info.lastIndexOf(' ');
          ....

Note, that what u get during collision is a SceneGraphPath object. The
outmost object in the path is the object u armed collision detector
with and if u set user data for an object other than the one u armed 4
collision detection, then u should retrieve appropriate object from
the trigPath during collision.

vladimir
>-------<===============>-------<
 World of Science & Technologies
   http://www.scientechs.com/
>-------<===============>-------<

NS> Hi,

NS> I'm writing a little car racing game and I need to know when my car finished the 
race. So I thougt when my car(a simple box) collides with the goal then the race is 
finished. But how can I find
NS> out with which object the car collides? For all other collisions it is not 
important to know which object the car hit so I used WakeuponCollisionEntry(Node). Do 
I have to use
NS> WakeuponCollisionEntry(SceneGraphPath) to find out the object I hit?

NS> Thanks for all help!
NS> Nathanael

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