Hi Paul,

Your code with a few additions:

//=========LOADER & ASSIGN =============
// Call VRML Loader with 'TopfileA.wrl'
  Scene scene = loadVrmlShape(slocation+fileName);
shapeBG    = scene.getSceneGroup(); // get scene branch group
shapeBG.setUserData("StartObj");

//Makes shapeBG appear in picking results
// All other BranchGroups that might be in your loaded scene
// must have this capability cleared, otherwise they will take
// the place of shapeBG in the pick result object 
shapeBG.setCapability(Node.ALLOW_PICKING_REPORTING);

//========= PICKING ===================


// use BranchGroup instead of Node
BranchGroup bgClicked = null;

    // Get Object Data to determine part
    bgClicked = (BranchGroup) pickResultArray[i].getNode(PickResult.BRANCH_GROUP);
    Object shapeSelected = bgClicked.getUserData();


Hope this helps,

Carlos

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