JohnGri Posted May 6, 2022 Share Posted May 6, 2022 How do I prevent a player from moving past the game board ? both vertical & horizontal? I thought this would be a simple to implement but I can't figure this out. I know how to handle playfield collisions. Thanks, John Quote Link to comment Share on other sites More sharing options...
Thomas Jentzsch Posted May 6, 2022 Share Posted May 6, 2022 You compare the current position with the boundaries. For faster movements you have to consider speed/direction or the previous position. Not sure why you refer to playfield collisions. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.