Wrap-Around / Screen Wrapping, Wrap-Around Mechanic

You are here:
Estimated reading time: < 1 min

Pseudo Code:

if (x > screenWidth) {
  x -= screenWidth
}
if (x < 0) {
  x += screenWidth
}
if (y > screenHeight) {
  y -= screenHeight
}
if (y < 0) {
  y += screenHeight
}

Was this article helpful?
Dislike 0
Views: 20