2D Toolkit Forum
2D Toolkit => Support => Topic started by: Stoneman on November 15, 2013, 09:11:43 pm
-
Hello everyone,
It would be very nice if someone could look over this and help me fixing that issue:
I just started working at my first Unityproject with the 2D-Toolkit. In the picture I attached, you can see how the wall, exists out of single parts is drawn. But you can also see that one strip in the left wall. This stripe is always appearing at a different location. Here is the script which is positioning the sprites:
//Walls
for(int j = 0; j < width +2; j++){
Instantiate(tileWall,new Vector3(4096 + (j * groundbounds.extents.x) + (wallbounds.extents.x),
4096 - (j * groundbounds.extents.y) + (wallbounds.extents.y), -j - 1), Quaternion.Euler(0, 0, 0));
}
for (int i = 0; i < height + 2; i++){
Instantiate(tileWallLeft,new Vector3(4096 - (i * groundbounds.extents.x) - (wallbounds.extents.x),
4096 - (i * groundbounds.extents.y) + (wallbounds.extents.y), -i - 1), Quaternion.Euler(0, 0, 0));
}
If anyone knows how to fix it our could suggest me another way how to render that scene, I would be very thankful.
Regards,
Stoneman
-
Is it because your camera isn't pixel perfect, or doesn't appear at a pixel boundary? What kind of camera setting have you got? Do you see the line even when you zoom in?
-
I'm using the tk2dCamera (orthographic) with the settings as in the attachment. There is no difference when I zoom in. But when I move the camera the line appears at an other location.
Should I maybe let them overlap a bit or can I solve the problem also otherwise.
Ok. I've solven the problem otherwise. Thanks.
-
I've run out of things to suggest, but I'll be happy to look into it if you send a repro case my way to support at unikronsoftware.com. Might be able to give you better suggestions then.