Author Topic: [Closed] LOS and full cover  (Read 12695 times)

ushas

  • Hero Member
  • *****
  • Posts: 661
[Closed] LOS and full cover
« on: April 05, 2017, 02:38:52 AM »
Overall those one-tile full-cover objects seems somehow problematic. I'm reusing the picture from the cone topic to highlight the possible issue. It tells us that we see the gentleman on the left but not the one on the right, yet the situation looks totally symmetric to me. Or do I read it wrong?

There is another interesting situation (or more like non-intuitive feature). Everybody having the same y coor:
E             OA1A2A3

E       - an enemy
O      - full-cover one-tile object
A1-3 - allies (one is on a tile right behind the object, no. 2 on the next tile etc.)

How it plays: It tells me that A1 sees E. if I give an order to shoot he will use around the corner shooting, steps one tile aside, shoots and returns. Whereas A2 and A3 are told to have no LOS regarding E. If I want to shoot him the same way, I have to manually step once to the side, shoot and step back, spending 2 more AP than A1.

At least I've tested this with a phonebooth. This situation though is for sure related to that shooting around the corner functionality, because it's the same for corners of buildings - the unit at the corner has much wider LOS than the one just one tile behind him. It's simply more obvious with objects like the ones from the pictures as an enemy can be on the same line.
« Last Edit: October 18, 2017, 05:39:45 PM by Daithi »

Daithi

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 1250
Re: LOS and full cover
« Reply #1 on: April 05, 2017, 10:40:32 AM »
Thanks for the report. It should be symmetric, yes. In the underlying data layer it is. LOS determination, doesn't happen on the data layer. Effectively, LOS is determined by drawing a line in the 3d world between the centre of the attacker's and defender's tile. If a 3d object marked as a LOS obstruction gets in the way, the outcome is no LOS. What's likely causing this, is a minutely off centre placement of the pillar.

ushas

  • Hero Member
  • *****
  • Posts: 661
Re: LOS and full cover
« Reply #2 on: April 06, 2017, 09:57:52 PM »
Hm, that's interesting issue to tackle. Errors in placements and overall imperfection how 3d graphics and the tile grid fit together are to be expected. However, even when LOS determined in the 3d makes maps more nuanced, the gameplay is practically tile-based. You agreeing with me above, that it should be symmetric, underlines this assumption. From that perspective the column on the picture looks pretty much centered, the off placement isn't clearly enough visible, yet it results into big difference.

There is so many objects you can revise. So it seems to me outright more effective to simply minimize the possibility of small errors impacting the gameplay by softening the edge. If it makes sense. So the question is, apart from attacker's / defender's tile sizes, how big additional deviation you take into account during raycasting calculation? (or how you determine LOS)  Because this column could easily fall under such expected error and not cause los confusion anymore.

Daithi

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 1250
Re: LOS and full cover
« Reply #3 on: April 07, 2017, 11:42:41 PM »
Interesting is one way to put it :) Yeah, mapping a 3d world onto tiles not uniform with all objects is problematic. Some snags are going to be unavoidable.

It's not going to be an easy one to solve. If the collider size (a lot of work for every object in game) is reduced, bullets will collide with objects below their surface and silhouettes will be off. Another possibility is adding a sub object with a collider and split the functions between them. Not good either. Raycasts either hit something or don't. A solution with alternate points could be possible, but it might cause other problems (allowing hits when it shouldn't). Not sure if I'll get to look at it, though, given time constraints. Should be possible to work around in most cases by moving, though.

Nomad

  • Sr. Member
  • ****
  • Posts: 453
Re: LOS and full cover
« Reply #4 on: April 08, 2017, 06:50:29 AM »
This looks like a shotgun cone issue to me.
The game calculates that if you look around the left to shoot the guy, then the column will be blocking LoS to the guy on the right. The same would occur if the shotgunner leaned around to the right. Naturally if you didn't lean at all, you'd have no line of sight to either.
The game knows you're going to shoot one of them, and just picked one.

This is just something that becomes noticeable because of the cone. The column is in the way, no matter which way you lean or slice it, but you can hit one of them (you just need to select which way to lean by using those green balls we just found out about).

Daithi

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 1250
Re: LOS and full cover
« Reply #5 on: October 18, 2017, 05:39:32 PM »
Closing this. Small anomalies are going to happen in maps, and trying to minutely adjust every full cover object on every map so they don't happen and trying to check that it has worked would be a sisyphean task.