Pong Ball Physics

If you are a new Irrlicht Engine user, and have a newbie-question, this is the forum for you. You may also post general programming questions here.
Post Reply
Fhqwhgads
Posts: 42
Joined: Tue Jun 21, 2005 1:43 am

Pong Ball Physics

Post by Fhqwhgads »

I dislike math. Can someone help me out with pong physics?
Fhqwhgads
Posts: 42
Joined: Tue Jun 21, 2005 1:43 am

Post by Fhqwhgads »

Sorry for double post but I have another question...

would this work for colision?

Code: Select all

	//P1 colision
       /* If ball.x == paddle1.x
           and
           if ball.y is lessthan Paddle1y+28(height of paddle) and is biggerthan paddley
      */

	if(x+6 == p1x && y < p1y+28 && y > p1y){
		if(dir == 1){
			dir = 2;
		} else {
			dir = 1;
		}
	
Guest

Post by Guest »

You could try using AABBs.
Fhqwhgads
Posts: 42
Joined: Tue Jun 21, 2005 1:43 am

Post by Fhqwhgads »

I got it working on my own. Thanks anyway :roll:
sauke

Post by sauke »

i really hope to see the final product of pong game:D can you please let me see the pong source code?since i am learning how irrlicht work...
MACARRAUM
Posts: 40
Joined: Sun Nov 28, 2004 8:52 pm
Location: Brazil

Post by MACARRAUM »

or try use Physics Libaries ( ODE, NEWTON, TOKAMAK, TRUEAXIS ) :lol:
Post Reply