Collision Detection - different object types, or multiple Shape3D objects

Hi,

I am currently developing an air hockey game in Java3D and have come across an issue with collision detection between the puck and the rest of the objects.

Can anyone tell me how will I be able to differentiate between objects with regards to collision detection?

Currently, because the puck is a cylinder, and the sides/goals are boxes, the way they see if they collide is through their transform groups (the way I have done it). However this doesn’t seem to work very well because the puck reads the same type of collision with any object it collides with. For example when it bounces off a side, the side changes colour/a sound effect is played, however the same happens when the puck collides with the paddles, and I don’t want the paddles to change colour/or the sound effect to be played. The same applies for the goals, which are also boxes, except a different colour, and also for objects which aren’t necessarily boxes - tested with a Shape3D polygon.

If I change all the objects in my plan to Shape3D, including the puck, which will obviously take some time, will the collision detection become easier? Will I be able to manipulate which items I want to highlight, or play a sound, or for example when the puck hits the goal increment the corresponding score counter?

Thanks,

AW

bump

I don’t think many people here know much about Java3D, sorry :confused:

see here :
http://www.java-tips.org/other-api-tips/java3d/collision-detection-with-java3d.html