Hello
Guest
Home
Help
Search
Login
Register
2D Toolkit Forum
»
2D Toolkit
»
Support
»
Tilemap + camera uv problem [solved]
« previous
next »
Print
Pages: [
1
]
Author
Topic: Tilemap + camera uv problem [solved] (Read 4121 times)
willeml85
Newbie
Posts: 9
Tilemap + camera uv problem [solved]
«
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.
It seems that the UV's are overlapping/moving when the camera moves.
Thank you
«
Last Edit: January 21, 2013, 02:44:08 pm by willeml85
»
Logged
willeml85
Newbie
Posts: 9
Re: Tilemap + camera uv problem
«
Reply #1 on:
January 21, 2013, 02:38:25 pm »
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.
Logged
unikronsoftware
Administrator
Hero Member
Posts: 9709
Re: Tilemap + camera uv problem
«
Reply #2 on:
January 21, 2013, 02:44:21 pm »
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.
Logged
Print
Pages: [
1
]
« previous
next »
2D Toolkit Forum
»
2D Toolkit
»
Support
»
Tilemap + camera uv problem [solved]