When an object wraps around, it kind of goes off screen first then wraps around.
https://imgur.com/a/Iu3IM
Here you can see that the object is partly outside. Is there a way to change that?
Use a separate identical sprite that you position manually.
So say the screen width is 640
player.x < 320
--- clone: set position to (player.y, player.x+640)
else
--- clone: set position to (player.y, player.x-640)
That's very creative thank you.
The other issue though is if you have a block on the other side. you actually of off-screen first and it just looks a little weird. It would be better to do this automatically.
It would be better to have the sprite not go offscreen before wrapping.
Develop games in your browser. Powerful, performant & highly capable.
You're probably better off just duplicating obstacles off screen to handle that.