I'm searching for some algorithms to modell some physiks and for collision detection in a 2d game. For example how to modell that a ball is hit by a paddle, has anybody some expiriences or can tell me a good link to find out something more???
but I still have a problem, with a rectangle interception test (as far as I understood) I can only test for example if a moving ball hit a resting paddle. But I want to calculate the interception between a moving paddle and a moving ball.
xb = vx * t
yb = vy * t
xp = x0 + r * cos(wp * t)
yp = y0 + r * sin(wp * t)
wp is the constant angular velocity
I thougt of something like:
(vx * t - x0)/(vy * t - y0) - 1/tan(wp * t) = 0
f(t) = tan(wp * t) - (vy * t - y0) / (vx * t -Y0) = 0
But I don´t think that I can solve such a equation in realtime on a mobile phone...(I think I would have to use something lika a gausian approach proceeding...).