help my math

View previous topic View next topic Go down

help my math

Post  jackmackg on Wed Sep 17, 2008 7:11 pm

I know you people on this frome are smart. I need help on a simple math problem on a simple game im tying to make. (pong) its like the hello world for games. tounge.gif

i need to find out what the x/y of a point will be that is moving at a angel at a constant about of pixels.

example:
http://img524.imageshack.us/my.php?image=74787141lj1.png


did i explain this good?

this is what is trying to do. when the game starts i want the ball to start moving in a random direction.
avatar
jackmackg

Posts : 87
Join date : 2008-06-12
Age : 24
Location : texas dallas

View user profile http://www.youtube.com/user/artfungames

Back to top Go down

Re: help my math

Post  TheHandofOdd on Wed Sep 17, 2008 7:40 pm

jackmackg wrote:I know you people on this frome are smart. I need help on a simple math problem on a simple game im tying to make. (pong) its like the hello world for games. tounge.gif

i need to find out what the x/y of a point will be that is moving at a angel at a constant about of pixels.

example:
http://img524.imageshack.us/my.php?image=74787141lj1.png


did i explain this good?

this is what is trying to do. when the game starts i want the ball to start moving in a random direction.
What is it on a grid? Shouldn't the X/Y point of the second circle be twice what the first one was.
avatar
TheHandofOdd
Admin

Posts : 371
Join date : 2008-06-11
Age : 36
Location : In A Box, USA

View user profile http://holycrapbatman.com

Back to top Go down

Re: help my math

Post  jackmackg on Thu Sep 18, 2008 5:51 pm

xx = speed*cos((angle)*pi/180);
yy = speed*sin((angle)*pi/180);

i found what i needed.
avatar
jackmackg

Posts : 87
Join date : 2008-06-12
Age : 24
Location : texas dallas

View user profile http://www.youtube.com/user/artfungames

Back to top Go down

Re: help my math

Post  Sponsored content


Sponsored content


Back to top Go down

View previous topic View next topic Back to top

- Similar topics

 
Permissions in this forum:
You cannot reply to topics in this forum