New answers tagged pixel
This is just so you understand the logic behind drawing lines, if you understand Bresenham that might be the better option to implement. A truly perfect pixel line is rather simple, you just need to calculate the ratio like you did in the question, the ratio is the angle of the line. A 45° degree line will have a ratio of 1:1. Imagine moving a brush, if ...
If you want to draw a line "by hand" then you can use Bresenham's Algorithm. The algorythm take two 2d points and draws a line. So given point A and a length L , here is how you compute point B to draw the line from A to B (depending on the axis: x from left to right, y from down to up) point2d B; B.x = cos(Angle) * L + A.x; B.y = sin(Angle) * L + A.y;
This article gives some useful explainations, even if that's before 4.3 came out: If you’re going for the “pixel art” look then the camera’s orthographic size is of critical importance; this is the trickiest part of nailing 2D in Unity. The orthographic size expresses how many world units are contained in the top half of the camera projection. ...
Turn off the scale function in the backgrounds tab in the map. If it seems out of scale make sure your texture for the back ground is the same size as the room/map you're in. Alternatively use this post here to create a background script that will upscale the back ground with (hopefully) crisp results. This utilises surfaces so if you need some extra help ...
Top 50 recent answers are included