2D Toolkit Forum
2D Toolkit => Support => Topic started by: willeml85 on January 20, 2013, 03:38:21 pm
-
Hello everyone,
I would like to ask if there is a solution for the behavior that is occuring in the following example image.
(http://s2.postimage.org/jm81fomop/example.png)
It seems that the UV's are overlapping/moving when the camera moves.
Thank you
-
I solved this by using ragepixel's camera.
self.position = new Vector3(Mathf.RoundToInt(player.position.x) + 0.05f, Mathf.RoundToInt(player.position.y) - 0.05f, self.position.z);
with just this line, it works good now.
-
That just makes sure the camera is always snaps to the closest pixel on screen instead of interpolating between pixel fractions, etc. Its always good to do that, and also make sure your sprites are on pixel boundaries too.