Line of sight
All units, both X-Com and alien, have a line of sight. A unit's line of sight encompasses any objects or other units which are:
- Within visible range
- Visible range for X-Com soldiers is 20 tiles during the day and dawn/dusk, 9 at night
- Aliens are not subject to the lighting penalties and have a 20-tile range at all times
- Not blocked by terrain, smoke, or other units
- Within the unit's field of vision
All units have a 90 degree field of vision, radiating outward in a cone in whichever direction they are facing.
Note that line of fire is not necessarily the same as line of sight. There are cases where you can shoot around objects (such as corners) that you cannot see around, and you can always shoot beyond the 20-square visual range (see Sniper Tactics). You can also shoot through smoke that you can't necessarily see through.
Also note that you can't see aliens right next to you when you first go through a door. To see adjacent aliens, you will need to turn twice to check your flanks: one facing (45 degrees) to the left, then two facings (90 degrees) to the right (or vice-versa). This will allow you to scan a whole room upon entry, obstacles notwithstanding. Thankfully, turning in place does not trigger reaction fire.
The visual-range map is "rounded" and decreases by 2 tiles in one dimension for every 1 tile in the other dimension, until it reaches the pure diagonal (see inset map). You may want to have soldiers e.g. just outside visual range of a UFO exit, so that enemies have used a chunk of their TUs before they see you (the better to reaction fire). Anyone directly lateral to the exit (no diagonal offset) should be at range 20, but others (with diagonal offset) should be "closer". For example: An offset of 19 tiles in one dimension (e.g. north-south) and 1 tile in the other (e.g. east-west) is also just outside the "20" visual range. Using this can help you have multiple shooters able to reaction-shoot to a particular tile at the same time - aliens are liable to stop and shoot as soon as they see even one soldier.
Elevation does not add distance to visual range. You will see an alien on the ground when at range 20 (horizontally) and elevated 4 levels, just as you'd see him at range 20 when at ground level. Keep this in mind if stacking flying-suit shooters vertically in "alley" situations (or any other time, for that matter). But beware overhangs that might block your LOS.
Note that "visual range of 20" is for sighting enemies, the most important thing in X-COM. Terrain works slightly different. Specifically: At ground level, you see terrain to 21 tiles away, not 20 (counting from your tile as 0, as was demonstrated in inset for sighting enemies). Also, if you are elevated, the range increases by one for each level, up to 24 tiles away for 4th level. Yet this is only for terrain. You will not see enemies past 20 tiles, as explained above. It can still be useful to know, however. You may think you've visualized the whole map out to the edge, but actually you haven't swept the last few edge tiles for enemies if you are flying high and stopping as soon as you can see all the way to the edge. Then again, it's unlikely that an alien is there and/or doesn't wander into view around the time you're checking it out. An exception exists with several arctic map tilesets, where puddles have the potential to trap non-flying aliens. Also known as: if you can't find the last alien on an arctic map when you thought you'd checked the whole thing, double-check corners or other edges where tilesets have made "traps".
Blind spots around corners
There are cases where aliens can see around corners (and shoot at you) when you cannot see them. Unfortunately, the rules that govern this are complicated: a seemingly-identical or mirrored situation can produce different visibility for you and the alien depending on whether it is a northeastern, northwestern, southeastern, or southwestern corner. Furthermore, there are cases where you can shoot back at the alien (even though you can't see it), and other cases where you can't shoot it, even though it can shoot at you with impunity.
In the diagram at right, the colored arrows represent aliens (and their facings), and the colored X's represent "blind spots" -- places where your units can be shot at by unseen aliens of the corresponding color. Depending on compass direction (only a northeastern corner is diagrammed here), some of these blind spots may not be experienced by your units.
If you can spot an alien at the same instant it spots you, it will not fire upon you until your next action (see reaction fire triggers). This is why these blind spots are so deadly: in a mutual-visibility situation, your units would normally be allowed to fire first.
Due to the large number of blind spots around corners (dependent on alien placement), there is no completely safe way to round a corner. The safest approach in most cases may be the path traced by the yellow line -- and if you have few Time Units left, you should stop before reaching the green or blue X's.
Furthermore, certain narrow corridors inside UFOs and alien bases restrict the path you can follow, guaranteeing that you will pass through one or more blind spots. If you believe an alien is hiding around a corner, it may be best to throw a grenade around the corner and wait until the next turn to approach. A motion scanner might also come in handy, but beware false negatives... aliens sometimes don't move for long periods. This may be especially true of psi-capable aliens.
In certain cases, it is possible to see into a UFO from the outside (see External UFO Windows).
Orchards, Cacti, and other non-wall terrain
These block line of sight much more effectively than line of fire, but are not as prone to one-way edges as walls. Examples (X is the soldier, O is the terrain; obviously, one should crouch behind half-height terrain to benefit):
....... .....__ ...____ XO_____ ...____ .....__ .......
X.... .O... ..__. ..___ ...__
Aliens on the _ squares, at the same elevation, will not see the soldier even if facing him. (Cacti are less reliable than other features.) One square up is trickier, but generally crouching behind a full-height terrain feature works as above.
One Way Diagonals
Proper North and West walls have a logical thickness of 1, and belong in their square. Due to a pixel-level asymmetry, for small units:
- North wall 1 square west: allows outbound line of sight/line of fire due northwest, blocks one of inbound line of sight or inbound line of fire due southeast
- extrapolated North wall 1 square south: allows inbound line of sight/line of fire due northwest, blocks one of outbound line of sight or outbound line of fire due southeast
- North wall 1 square east: blocks outbound line of sight due northeast, allows inbound line of sight due southwest (but provides cover against accurate shots anyway)
- extrapolated North wall 1 square south: blocks inbound line of sight due northeast, allows outbound line of sight due southwest (but will block your accurate shots anyway)
(Zaimoni: above was tested in turn-swapping mode for a Floater Terrorship. The wording assumes that reaction shots and intentional shots are equivalent, but this is merely Occam's Razor; it really should be tested more carefully. It is also possible that species makes a difference. In particular, the blind-spot diagram above isn't consistent with this testing.
The door-opener x was summarily ambushed, testing was done with the live agent X
A...A __x__ ..X.. ..L..
Using the LOFTemps format, it might be possible to compute where the possibly distinct voxels used to compute line of sight and line of fire actually are.
Informative cases for future testing:
- West wall one square north, alternately West wall one square west
- West wall in own square, alternately West wall one square northwest
Sectoid Reaction Fire
Sectoids are short. This noxiously changes their line of sight/line of fire.
- The Skyranger walls to the sides of the exit ramp do not block Sectoid reaction fire from the side. Other aliens evidently cannot infer the agent's presence from the visibility of their feet.
- Farm terrain? Regrettably, sectoids see your agents through fences far more easily than your agents see sectoids. Should the triggering agent survive the initial reaction fire through a still-intact fence, he should crouch immediately to get a visual on the sectoid.