Major sentry targeting problems

TyphonTyphon Join Date: 2002-11-01 Member: 1899Members
edited September 2012 in NS2 General Discussion
This is a partial repost of discoveries prompted by Blashemy's findings in a <a href="http://www.unknownworlds.com/ns2/forums/index.php?showtopic=120828" target="_blank">different thread</a>, but I've found enough extra weird stuff to warrant its own thread I think.

<b>Sentry targeting logic has some huge problems. </b>

Now this isn't about tracking speed, or accuracy, or damage or anything like that. What I think I've found here is that the basic math and logic a sentry uses to fire upon a target is flawed. I believe it is somehow linked to how the sentry determines the appropriate vector between itself and the target; the vector along which it should fire to hit the target. Somehow the orientation of the <i>target</i> is part of the calculation when in fact only the <i>position</i> of the target should matter. I base this conclusion on the following findings:

<b>FADES</b>
1. Sentries will not fire upon a fade facing them
While a fade has the sentry in front of it, the sentry will not fire. The fade can look up or down, taking the sentry out of its field of view and the sentry still will not fire. However, once the fade turns to face away from the sentry, the sentry will have sustained fire on the fade. Note that unlike most other behaviors found below, movement doesn't change this behavior.

1a. Sentries don't fire upon moving fades
If a fade facing away from a sentry moves, the sentry will stop firing or at best have intermittent fire.

1b. These behaviors are changed when crouching
Sentries <u>will</u> fire upon a crouching fade facing them but moving. Likewise they will fire upon a moving, crouching fade facing away from the sentry.

<b>LERKS</b>
2. Lerks on the ground, facing a sentry, will experience intermittent sentry fire
Walking lerks are almost never shot at by sentries. They'll occasionally fire off a bullet or two, but no sustained fire will result. However, upon taking flight the sentry will do a <i>slightly</i> better job of targeting the lerk. The timing is difficult to tell, but I suspect the action of flapping the wings plays a role here.

2a. Except if you change facing
A lerk on the ground who faces upwards a bit (from facing directly towards the sentry) will experience sustained sentry fire. If instead you spin around in a circle (keeping your view level), you will get sustained fire. Continuing to spin in a circle will cause alternating lengths of sustained vs intermittent fire. Moving <u>in any way</u> will reset these conditions (I believe because it resets your facing in some fashion). Facing downwards will result in no fire at all, not even intermittent.

<b>SKULKS</b>
3. If a skulk looks away from a sentry, then looks back, the sentry stop firing
Sentries normally have sustained fire on skulks. However, if you simply look away from the sentry and then look back at it (I'd say about 120° of rotation away then back is sufficient, spinning in a full circle also works). As with the lerk, this effect will disappear if you move in any way.

3a. Wallwalking skulks can change sentry firing by changing facing
This is much harder to find concrete connections between action and result, but suffice to say that while wallwalking just look around a bit. You'll find that at some points the sentry simply stops firing.
<b>
GORGES</b>
4. Gorges seem to have no issues
I could not find any facing or movement sequences that caused sentry targeting problems for Gorge.
<b>
ONOS</b>
5. Onos the opposite of Fade
Although normally experiencing sustained fire, if a stationary Onos rotates in place enough the sentry will stop firing. Moving will reset this condition.

I'm not sure why the behavior is so different for each lifeform, but I suspect it has something to do with the unique movement options each has and how the engine handles some core orientation vector for them.

These targeting problems have to be fixed before any meaningful discussion of the sentry's appropriate damage, accuracy, tracking speed, etc. First, they have to behave sensibly and reliably, and then we can balance how much damage they should do when they are hitting.

Disclaimer: These issues were originally discovered on a local server with cheats 1 and darwinmode. Later, the basic behaviors of each lifeform were verified on a live, non-cheats server (basic fade facing, lerk on ground, skulk/gorge/onos seemed normal). Later, I dove deeper into the problems on a cheats 1, darwinmode local server where I discovered some of the stranger intricacies. Therefore, some of the really weird things regarding facing may be due to cheats, but given the fade and lerk portions were confirmed on a non-cheats server I do not think that likely.

Comments

  • countbasiecountbasie Join Date: 2008-12-27 Member: 65884Members
    Lol. Strange stuff.
    Well, who needs sentries in the first place.
  • HeymanHeyman Join Date: 2005-03-29 Member: 46895Members
    This could certainly use a fix.
  • TyphonTyphon Join Date: 2002-11-01 Member: 1899Members
    edited September 2012
    Not just sentries, Hydras are affected as well.

    Behavior between Hydra and LMG marine is similar to onos. If you find some hydras you need to kill, run into view facing away from them, and then stop, then turn to face them. They'll stop shooting.
  • BigDBigD [OldF] Join Date: 2002-10-25 Member: 1596Members
    Hmm...

    A couple nights ago I was playing around, not sure if it was the same thing, but I walked right up to a sentry (playing passive onos! small game) and it stopped firing at me. I was standing right in front of it, then I backed up a little bit (let's say 2-3 feet?) and it finally started firing at me.
  • ellnicellnic Join Date: 2010-07-19 Member: 72559Members, Reinforced - Shadow
    They should fire at their targets like the TF2 sentry. When you are in view and range it will just fire at you.
  • mushookeesmushookees Join Date: 2008-03-26 Member: 63967Members
    +1

    ive also seen this in my tests
  • NordicNordic Long term camping in Kodiak Join Date: 2012-05-13 Member: 151995Members, NS2 Playtester, NS2 Map Tester, Reinforced - Supporter, Reinforced - Silver, Reinforced - Shadow
    So until this is fixed, we will start seeing everyone doing little dances in front of sentries... Is that what I am hearing?
  • countbasiecountbasie Join Date: 2008-12-27 Member: 65884Members
    <!--quoteo(post=1973884:date=Sep 8 2012, 05:16 AM:name=james888)--><div class='quotetop'>QUOTE (james888 @ Sep 8 2012, 05:16 AM) <a href="index.php?act=findpost&pid=1973884"><{POST_SNAPBACK}></a></div><div class='quotemain'><!--quotec-->So until this is fixed, we will start seeing everyone doing little dances in front of sentries... Is that what I am hearing?<!--QuoteEnd--></div><!--QuoteEEnd-->
    Yeah, kind of those old Nintendo cheats :D
  • _Necro__Necro_ Join Date: 2011-02-15 Member: 81895Members, Reinforced - Shadow
    Really strange stuff. Nice find. Should definitely be fixed soon.
  • ASnogarDASnogarD Join Date: 2003-10-24 Member: 21894Members
    I would imagine the issue is about the target scanning routines introduced to limit the number of times SG's and Hydras look for targets.
    Old 156 era builds a few Hydras and SG's would tank the server to a crawl as the SG/Hydras would scan every loop, this was changed to only seeking if a target was in the same area as the SG/Hydra... then adjusted to deal with walls... and so forth and so forth.

    I bet the SG/Hydras are somehow losing the target and not considering it in the area until it moves where it is re-aquired.
    Perhaps the aquisition is tied to movement, it is logical to assume your targets will be moving rapidly.
  • shad3rshad3r Join Date: 2010-07-28 Member: 73273Members
    edited September 2012
    I had a quick look at this - there is a helpful console command called "target" that outputs targeting info for the nearest ai object

    When fades are facing a sentry, the target command says visibility from the sentry to the fade is "N/A"

    <!--c1--><div class='codetop'>CODE</div><div class='codemain'><!--ec1-->Server  : 213.407349 : debug Sentry-383
    Server  : 213.407349 : Sentry-383 @ (14.4087, 2.7532, -22.045): target debug (full=false, log=false)
    Server  : 213.407349 : MarineStatic :
    Server  : 213.407349 : MarineMobile : 1 entities (MobileTarget) inside 15 range ({class "Fade"})
    Server  : 213.407349 : Fade-455, in range 2.7038676738739 (nil), in radius true, valid true, unfiltered true, visible N/A<!--c2--></div><!--ec2-->

    When the fade looks away, it says visibility is "true"

    <!--c1--><div class='codetop'>CODE</div><div class='codemain'><!--ec1-->Server  : 225.171143 : Sentry-383 @ (14.4087, 2.7532, -22.045): target debug (full=false, log=false)
    Server  : 225.171143 : MarineStatic :
    Server  : 225.171143 : MarineMobile : 1 entities (MobileTarget) inside 15 range ({class "Fade"})
    Server  : 225.171143 : Fade-455, in range 2.7038676738739 (nil), in radius true, valid true, unfiltered true, visible true<!--c2--></div><!--ec2-->

    All i did between those two "target" commands was turn my view to look away from the sentry.

    Looking at the code that produces this output, N/A will be returned if GetCanSeeEntity(sentry, fade) fails.

    Given the results vary with target orientation are are different for each Alien type, could the problem be tracing to part of the target entity without filtering out the target entities own collision rep or something?
  • 1dominator11dominator1 Join Date: 2010-11-19 Member: 75011Members
    edited September 2012
  • shad3rshad3r Join Date: 2010-07-28 Member: 73273Members
    edited September 2012
    Found the problem.

    The issue is that the position the sentry is aiming at (returned by GetEngagementPoint()) does not rotate with the target's model. Sometimes this position is inside the model, sometimes it isn't, depending on which way the model is facing.

    You can see the problem this way:

    Be an alien standing in front of a sentry
    enable thirdperson
    enable targeting traces ("trace tar" command)
    Spin around.


    You will see that the sentry targeting traces are often going to an engagement point which is outside the target model. This means the sentry thinks it can't see the target.

    When the skulk faces away from the sentry, the sentry is tracing to an engagement point in the air near its arse.
    <img src="http://i.imgur.com/kPavS.jpg" border="0" class="linked-image" />

    As the skulk rotates towards the sentry, the engagement point starts to intersect with the model.
    <img src="http://i.imgur.com/ySRew.jpg" border="0" class="linked-image" />

    For the fade, the engagement point is in the space in front of it's belly when it is facing forwards. When it turns to the side, the point intersects its arms.

    EDIT: added screenies
  • TyphonTyphon Join Date: 2002-11-01 Member: 1899Members
    edited September 2012
    Awesome stuff Shad3r! Should be pretty easy for the devs to find the fix from there.

    Played around with this a little bit, the lerk's engagement point is actually above its left shoulder. The intermittent firing is a result of the lerk's idle animation, which has the lerk breathing heavily, which raises and lowers its body. At just one point through the animation the shoulder rises high enough to intersect the engagement point, and so the sentry fires for a moment.

    Solution seems to be either to target some other element of the model instead of the engagement point, or to make sure that the engagement point resides inside the model and moves as the model rotates.
  • IronHorseIronHorse Developer, QA Manager, Technical Support & contributor Join Date: 2010-05-08 Member: 71669Members, Super Administrators, Forum Admins, Forum Moderators, NS2 Developer, NS2 Playtester, Squad Five Blue, Subnautica Playtester, Subnautica PT Lead, Pistachionauts
    Shad3r sent me a PM, its now reported.
    Thanks!
  • AurOn2AurOn2 COOKIES&#33; FREEDOM, AND BISCUITS&#33; Australia Join Date: 2012-01-13 Member: 140224Members, Forum Moderators, NS2 Playtester, Forum staff
    well that explains why my turrets target then undarget anything that moves half an inch, hope it's fixed, might be able to use turrets (if only slightly) if it is.
  • GrimfangGrimfang Join Date: 2003-02-04 Member: 13086Members, Constellation, Reinforced - Shadow
    It's really nice to see work like this. Hopefully we can get more accurate turrets in one of the next patches, when this has been corrected.
  • DeadzoneDeadzone Join Date: 2003-07-03 Member: 17911Members, Reinforced - Shadow
    Anyone notice how the devs just made a lot of this work "go away" by suddenly making all sentries anti-structure? :o
  • KopikatKopikat Join Date: 2012-09-06 Member: 158170Members
    <!--quoteo(post=1976102:date=Sep 11 2012, 09:53 PM:name=Deadzone)--><div class='quotetop'>QUOTE (Deadzone @ Sep 11 2012, 09:53 PM) <a href="index.php?act=findpost&pid=1976102"><{POST_SNAPBACK}></a></div><div class='quotemain'><!--quotec-->Anyone notice how the devs just made a lot of this work "go away" by suddenly making all sentries anti-structure? :o<!--QuoteEnd--></div><!--QuoteEEnd-->

    ? They fixed the targeting issues. I don't think that they were made anti-structure because of laziness...

    They do seem to be giving Marines fifty billion different anti-structure tech though.
  • AurOn2AurOn2 COOKIES&#33; FREEDOM, AND BISCUITS&#33; Australia Join Date: 2012-01-13 Member: 140224Members, Forum Moderators, NS2 Playtester, Forum staff
    the current role of the turret is to look scary and give aliens the stare of death.
    it's op pls nerf.
Sign In or Register to comment.