Hey!
I have these colored grids, 192 pixels wide, 120 pixels tall, and they move. I want them to wraparound the horizontal dimension so that when they start going out one side, right away they start popping out of the other.
Instead what I am getting is this “shadow region” where they disappear until their entire bodies are gone on either side, and only then they start popping out through the other.
Map is 1921 pixels wide. I don’t know if that’s relevant.
Here is the function I’m using. How can I make it go from what its doing now to what I want it to do?
if (location.x > width) {
location.x = - 192;
} else if (location.x < - 192) {
location.x = width;
}
Thank you.
Cacops