Collision Detector in Billiard

Hi guys,
this is my first post here. it’s about quite months that i’m using java3d for a university project. We must realize a billiard game, 3d with java3d.
I lost my mind for days and days!!! :’( :’( :’(
Now i’m trying to understand howto get collision between balls working. i found some behaviour like CollisionDetector that have a processStimulus method, but i need to understand howto get a relative position of balls, howto get the exact point of impact between two balls for later calculating new direction, etc…
Could u help me to find right way to develop my subject ? i tried to search some examples but i don’t find nothing to helpful and not so complex.
I have another problem: we don’t have alot of time, about one month. Could u help me? thanx Kr4b

If I were working on your project, I would approach it thus: I would separate the physics model from the 3D view entirely. If you think about it, everything in a game like billiards is working in 2D so it would be smart to create a 2D model of your table and balls and use that to calculate your collisions, trajectories and movement. I would tie it in to a simple 2D visual representation for testing.

I would then use that model to place my balls in my Java3D environment, so I would run a behaviour that ran every frame and just requested the current positions of the balls from the internal representation of the game and used that to set the x and z co-ordinates of the balls in the scene.

J3D doesn’t have very good collision detection so this would be quicker and more accurate for this kind of project.

The standard collision detection that Java3D offers isn’t what you want. Instead of collision detection you need collision avoidance, J3D.org has some good articles about that. Since it’s a billiard game you may not even need that, since you can calculate everything if you have the positions and the radius of the balls. Circle/circle collision physics are quite hard, but I’m sure you can find some examples on the internet.

Circle - circle collisions are hard? They are almost trivial compared to everything else! Breakfast’s idea is very good in that respect,