Tag Info

New answers tagged

0

A sidescroller involves you having 2 background images then when one's position crosses the screen it goes behind the other one and it keeps looping to this involves using Rectangle by the way i have a video for your problem exactly. https://www.youtube.com/watch?v=NZEzD0GvImg


0

I figured out what the problem was. It was not a problem with the camera calculation, but rather with drawing the player. The player's coordinates is in pixels in the works ( between 0 and world.GetLength(0) * tile_width). So when I drew the player, I forgot to subtract the camera position so the player world stay inside the camera view. This is what my ...


0

You could move the background or make a new orthographic camera. Then do some thing like camera.setPosition(player.x, player.y);


0

Moving background has better performance than moving camera. On the other hand, moving camera is more intuitive and that's what we see in real life.It's all up to you.



Top 50 recent answers are included