Holy Crap Batman
Would you like to react to this message? Create an account in a few clicks or log in to continue.

help my math

2 posters

Go down

help my math Empty help my math

Post  jackmackg 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.
jackmackg
jackmackg

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

https://www.youtube.com/user/artfungames

Back to top Go down

help my math Empty Re: help my math

Post  TheHandofOdd 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.
TheHandofOdd
TheHandofOdd
Admin

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

http://holycrapbatman.com

Back to top Go down

help my math Empty Re: help my math

Post  jackmackg Thu Sep 18, 2008 5:51 pm

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

i found what i needed.
jackmackg
jackmackg

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

https://www.youtube.com/user/artfungames

Back to top Go down

help my math Empty Re: help my math

Post  Sponsored content


Sponsored content


Back to top Go down

Back to top


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