Forum rules - please read before posting.

NavMesh ignored

edited September 2019 in Technical Q&A

Hi,

I'm experiencing a strange thing. NavMesh i being ignored when being outside of camera view.
2D game in full HD, camera size is set to 5.4 to match the canvas.
NavMesh is below the canvas ( player will be visible without feet )

Example: https://imgur.com/a/AuzypNU

You can click outside the NavMesh to a certain distance to get the player walking. When the NavMesh is outside the camera view, it's ignored. Player keeps standing (when clicking above the NavMesh)
When NavMesh is in the camera view, then clicking outside - above the NavMesh works just fine.
When just part of the NavMesh is in the view, only clicking above this part works.

Movement metod: point and click

Is this intended? what am I missing?

2019.1.9.f1
1.68.3

Comments

  • If you don't click on the NavMesh, then the neareset NavMesh to the cursor will be found by simulating clicks on the screen beneath the actual cursor. It may be that this doesn't work if the actual NavMesh is outside the screen area.

    I shall attempt a recreation and see if a workaround is possible.

  • edited September 2019

    One workaround would be having another "outfit" (switching to a different set of animations) of the player with different anchor point (above the feet) and having the NavMesh in the actual camera view. That would require having the textures imported twice and thus increasing the build size, unless I'm not mistaken though.

  • Shouldn't be necessary, in fact. I wasn't able to recreate an issue - using the 2D Demo's Managers, I made a test scene with the NavMesh below the camera view and didn't have any trouble moving the player around.

    What's your Settings Manager's NavMesh search % field set to? Try increasing it all the way up to 1.

  • 0.5, setting it to 1 doesn't changes things.
    But changing NavMesh search direction from Radially Outwards From Cursor to Straight Down From Cursor makes it work.

    I thought in that case the NavMesh needs to be always bellow the cursor when click, but based on what I've just tried it works from below or any side.

    Well that fixes my problem then. Can you recreate the problem if you use Radially Outwards From Cursor?

  • Can you recreate the problem if you use Radially Outwards From Cursor?

    I can now, yes. I shall look into this, but know that you can set this value on a per-scene basis via custom script. To change it's value (as with any Manager value) at runtime, you can get an API reference to it by right-clicking the field's label.

  • Okay, great :)

  • This is actually an intended restriction, since with a "radial" search it's possible to go off-screen in all directions. I shall, however, make this restriction optional.

  • Alright, thanks for the info, Chris.

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.