Forum rules - please read before posting.
Tech questions during the weekend? Drop in on the community Discord channel!

Pathfinding: Player stuck when run on corners

Hi,

I checked this through the forum but seems nobody is having this issue. I'm with latest AC 1.47b, Unity Navigation, and latest Unity 5.2. 

The problem is with point'n click and pathfinding. If I Click on a destination, the player could reach it without problem, but If I double click, most of times the player gets stuck in some corner running ad infinitum without the possibility to reach the goal.

Seems a bug with Pathfinding 
«1

Comments

  • Might be completely unrelated, but I've also experienced some weirdness with pathfinding lately. I may have spoken too soon about not having any problems with 5.2 ... :-/

    Too busy with fixing bugs at the day job to really spend much time on this at the moment, but just thought I'd mention it.

    @carlosrovira : your setup is purely 2D if I remember correctly?
  • Hi @snebjorn,

    no 2D. My setup is 3d (isometric) and is a project created from scratch.
  • Okay, I'm on 3D as well.

    I'm using unity navigation in the scenes where I've seen problems so far, but haven't had the chance to test enough - just trying to see if there's a pattern.
  • I also THINK the problem is there with some cutscenes - just thinking aloud here - but will do some proper testing tomorrow.
  • It seems like velocity was the root of troubles. If walk, the player could maneuver right through the path. But running is to quick and can pass some corners :?
  • Hmmm ... I don't use running at all in the scenes where I've seen problems - but I think there might be some AC-specific movement logic that could cause problems if Unity have changed their implementation ...

    Probably best to run some examples with extra debug logging enabled and see if that provides any clues. I'm off to bed for now, but will give it a try tomorrow.
  • Thanks Snebjorn, I must say that I found a way to get rid of this problem. Configuring "Movement Settings".

    But I continue considering this a bug, since the player doesn't have a dead end and I think all configs should not affect the player so he gets stuck in a corner.

    Moreover, I get a config where I started running (double click) and when reach the conflictive zone decelerates but doen't end running as I would expect :?
  • I ended up not being able to sleep, so have spent the night trying to debug the problems I've been seeing - but suddenly I can't recreate it. Everything works fine now - typical!

    So 5.2 might not be a problem after all ...
  • Snebjorn, it is always the way.
  • Haha - don't say that! I have a long day ahead of me with bug reports at the job that pays the bills - and unfortunately I can't just close those cases with "problem went away by itself" ...  :-)
  • Yeah, one can dream though right?  I bet you are doing a good job.  Would love to see your project though so share when you can!
  • Ok. The stuck problem is fixed. Now I have an accurate movement with point and click and the player gets all places with path finding. But... my problem now is that player goes from "RUN" to "WALK" when is near obstacles.

    I'm going through all configurations in the player and settings and going through manual and forums, but can't find a way to make the player always run.

    I'm sure this must be something easy. Someone could give me a clue?

    Thanks


  • Mecanim settings -> Slow movement near wall colliders?

  • Thanks Snebjorn, but this not make nothing in neither configuration.
    I left it unchecked that I think should be the right config
  • Just my first thought ...  :-)

    Any clues when watching the animation controller parameters at runtime?
  • I was debugging and tweaking right now, but nothing strange.
    Speed changes as expected since there's a change from walk to run and viceversa.
    I think the problem is between mecanim params and pathfinding.

    As a final test I change the player to Tin Pot, and is behaving the same (so in the other hand this is legacy, so is not something mecanim related...)

    The test is to put two walls as a corridor with 1 meter between both and bake the navigation,run through the corridor (with two click, point'n click) as the player approach, change from run to walk
  • Have you tried using the "Player: Constrain" Action to limit the player's movement to "Always run"?
  • Hi Chris,

    sorry, but I that's not what I want. I want the user walk (one touch) or run (double touch).
    But without obstacles modifying the behaviour from run to walk.

    This is not a bug for you? Is the normal behaviour? (I think it could be a checkbox to get one flavor or the other...)

    Thanks Chris!
  • It doesn't sound like normal behaviour to me, but I would have to see it for myself as it's quite difficult to visualise when just reading.  Please post screenshots and/or steps to recreate this issue.
  • Could I send you a link to download a zip file of my test project?
Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Welcome to the official forum for Adventure Creator.