No announcement yet.

Corner Cutting while in MoveTorward and bad Wall Hiting?

  • Filter
  • Time
  • Show
Clear All
new posts

    Corner Cutting while in MoveTorward and bad Wall Hiting?


    for those who don't know this, by default if a pawn is using MoveToward and uses the default pathnode system the pawn will cut corners for "smoother" cornering. As sidenote if MoveTo is used this wont happen.

    While this is neat and works most of the time, somehow around some corners the pawns simply cut to much and run into the wall. There exist those "bAdjusting" and "bAdjustFromWalls" members in the controller that seem to fix most of those cases, but i still get quite some consistent reproduce-able cases where the pawn cuts to much and runs into a wall and than also stays there and wont move away. So basically the pawn is stuck now and needs special handling to get away. Since i did not find a callback/notify i can use or prevent excessive corner cutting, i wonder if someone else dealt with this problem and how?

    So is there some way to "steer" the amount of corner cutting? I'm also wondering why this even happens, if the pathnode system can check for collision beforehand and "should" know how much around a corner u can cut, by tracing for possible obstacles. This could even be checked beforehand while the path network is build and saved as angle/loc for each node.

    I would like a callback, that tells me the adjusted position everytime moveToward wants to cut corners, so i can do the "proper" obstacles checks and adjust the cornering amount, but i could not find one. Atm one idea would be to poll via timer and do traces for "GetDestinationPosition()" and adjust accordingly of a obstacle is hit, but this seems rather hacky.

    Since the "bCanCutCorners" is in the ReachSpec and not the pathnode itself, i cant even disable this manually for problematic nodes.

    I'm also a little confused how "bAdjusting; // adjusting around obstacle" actually works and what are the condition for this, since the UTBot seems to not use this.

    Andy ideas tips?

    bye Andy

    PS: Pathing is so much fun... with 90% of the pathing members not proper documented