MB-86

hi, ive been making a pool/ billards game in xna in the past weeks and i am having trouble with the collison. im currently using boundingsphere's and they work when the white ball hits but when the ball comes back at it, it stops moving.

Any Help



Re: XNA Framework Ball Collison for pool/ collision

Michael Morton

http://www.gamasutra.com/features/20000516/lander_01.htm

You will need to log in to access this article however it covers pool physics :)






Re: XNA Framework Ball Collison for pool/ collision

Dr.9

Maybe not quite what you're looking for but why calculate a bounding sphere on a ball shape anyways


It's a sphere the closest it can get to another sphere or surface is it's radius.






Re: XNA Framework Ball Collison for pool/ collision

Ageel

Hi,

First you could use

if ( (ball1.location-ball2.location)<(ball1.radius + ball2.radius) )

{

// collision detected since distance between the 2 balls > total radius of the two

}

then you should loop through all balls (including the white one) after initiating the white ball movement.

I can't see any sense if the white ball is not hit afterward!! :)

hope this helps

regards,