S
seatizen
Hello.
My problem is:
I've got two Box objects on the screen. I click one of them (picking):
....
sceneGraphPath = branchGroup.pickClosest(pickRay)
....
How can i find out (using the sceneGraphPath object) which Box did i
clicked?
When i was using ColorCube objects i could do it:
ColorCube cc = (ColorCube)sceneGraphPath.getObject();
and it worked. Now i need to use Box objects and there is an error
(ClassCastException).
Is it possible that pickClosest's result is only one of the sides of the Box
(not whole Box)? - and if so - how can i find out which Box object is it
exactly??
I'll be REALLY greatful for any help.
Greetings
(e-mail address removed)
PS: If you have some basic code (about picking) please send me too.
And sorry
My problem is:
I've got two Box objects on the screen. I click one of them (picking):
....
sceneGraphPath = branchGroup.pickClosest(pickRay)
....
How can i find out (using the sceneGraphPath object) which Box did i
clicked?
When i was using ColorCube objects i could do it:
ColorCube cc = (ColorCube)sceneGraphPath.getObject();
and it worked. Now i need to use Box objects and there is an error
(ClassCastException).
Is it possible that pickClosest's result is only one of the sides of the Box
(not whole Box)? - and if so - how can i find out which Box object is it
exactly??
I'll be REALLY greatful for any help.
Greetings
(e-mail address removed)
PS: If you have some basic code (about picking) please send me too.
And sorry