Original Post
if you can, plz explain it very simple,
i have a velocity for the ball, plus position and to bounce it, i do it the most simplest way.,
// this is how i move the ball
ballpos += ballvelocity * elapsed time
// and this how i bounce the ball against the wall and paddle
check for collision against wall
if true then {
ballvelocity *= -1.0f;
set ball position next to the object }
check collision again paddles leftarea, rightarea and middle area,
then same method as above, i make the velocitiy negative.,
okey my problem here is, the bounce on the paddle would be wrong because it would just bounce back where it came from, it should bounce on in a new direction, also, how would i go by giving the angle i desire for the ball?
also, how do i know exactly on what spot on the paddle did the ball hit it?
btw, am using x and z axis for this, i use bounding volumes for the collision detection and D3DXVECTOR3 for the positions and velocities., do i need an acceleration? if so, how will i use it?
many thanks,
[edited by - mickey on August 11, 2002 10:01:13 AM]