Skip to main content
gamedev.net
🔒 Locked

Pool Game Angles

Started by Melinda Dec 22, 2002 at 6:51 AM 1 replies 200+ views
Original Post
Melinda
Melinda
Hi can you help me make my player bounce off my walls with a pool game style angles heres the code im using but its not right and i cant solve it myself Player.ScreenPosX +=Player.Speed; Player.ScreenPosY +=Player.Speed; if(Player.ScreenPosX>=750) { Player.Speed = -1; } if(Player.ScreenPosX<=10) { Player.Speed = +1; } if(Player.ScreenPosY>=550) { Player.Speed = -1; } if(Player.ScreenPosY<=10) { Player.Speed = 1; } BltSprite(Player);
Melinda
Melinda
Thankyou for replying i changed Player.speed to Player.SpeedX and Player.SpeedY and it works great!

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.