# Help with billiard 'game' (how to ignore certain collisions)

This project is my attempt at learning more about the BGE. It is lacking a lot and will probably seem very crudely made to more experienced users, but I’m taking it one step at a time. My goal right now is not to add in any game rules or advanced physics or anything like that, but just to be able to knock some balls around in a relatively easy, intuitive way.

Controls:
F - third person view (rotate freely around the cue tip)
T - top view camera
B - ball return camera

Arrow keys - force the cue ball around
WASD - control the cue tip (a somewhat awkward way to “push” the cue ball around)
Space - jump (lol)

Right now the main flaw is that there is no way to rotate/aim the cue ball before rolling forward with the up arrow. It only moves in a very ‘global’ XY manner, which is obviously very unintuitive. Ideally I’d like to be able to rotate the cue ball on the global z axis for aiming once it stops rolling by using the left and right arrows, and then the up arrow would cause it to roll forward in that direction you’re “facing”…

but for now I’ve devised the “tip” object, which always tracks to the cue ball and can be moved with WASD. The problem with that, however, is when you want to move in closer to the cue ball, you’ll knock around all the other balls that are in the way when passing by them.

So my main question for now is: How can I make the 15 object balls ignore the tip? I only want the tip to be able to collide with the cue ball. Can that be done with the logic bricks?

billiardgame2.blend (1.39 MB)

You can do this with collision groups, under the physics tab of your object. Change the collision groups/masks for the cue ball and tip objects so they looks like this:

Tip will collide with group 2, but not group 1.
Cue ball will collide with both groups 1 and 2.
Everything else only collides with group 1.

Collision groups are infamous for not quite working the way they should, but I tested this in your blend file and it works.