Hi I’ve been learning unity and I’m trying to move an object in a loop in the screen: meaning if the object reaches the end of the screen/camera view to the right it should appear at the left of the screen similar to what happens when you use the mouse to adjust the position of an object in the inspector by clicking the axis and moving de mouse horizontally (when it reaches the end of the screen it appears at the other end)
Where exactly do you get stuck, how far did you get?
Do you know how to change position of object using code?
Do you know how to have object continuously moving?
Do you know how to do something conditionally?
Can you put the first 3 things together and teleport object to the left after it has moved sufficiently far to the right (ignore the part abut edge of screen for now).
Do you know white kind of coordinate systems are involved for the object you are moving? The exact functions you will need will vary depending on the kind of objects you have. For regular worldspace objects (like sprites, 3d meshes, …) you will want to use camera API for converting between world space and viewport coordinates. For canvas objects like Image and most RectTransform stuff it will vary depending on canvas type (overlay canvas, worldspace canvas, screen space camera).
Sorry I might have explained myself poorly here. I’ll try again
What I intent to do is what you can see in this video
Where the world loops on it self, I initially thought it could be done by moving the objects (that’s why I asked the question above) but it seems complicated to do and I don’t see how to make it look seamlessly
Maybe some rendering or camera config/logic I could use?
this should be simple but its really hard to do, you have to make fake copies of your sprites and use multiple cameras, you need also to have a bit extra of fake terrain. Just so you know theres no easy way to do this, it will be different for how you are coding the movement and physics on your specific game
I had hoped it would be something easier to do, I’ll add some code samples with my solution approach when I finish implementing it.
Thanks for the help!