Forum rules - please read before posting.

Mouse Click not showing where I clicked

Hi all, I've created a 2.5D game and somehow when clicking to have my character move the mouse cursor registers way off center of where I initially clicked and the character then moves to that spot?

image

Comments

  • The destination in 3D space has to be on a NavMesh - if there isn't one "under" the mouse when you click, then it'll find the nearest point to it.  Does your NavMesh cover the bottom portion of your image?
  • Hi Chris, thanks for the quick feedback. I believe my Navmesh does cover the bottom part of my screen. I've attached some more screenshots for you - perhaps this will give you a better idea of the issue?



  • OK.  Couple of things to check for:
    1. Is the floor on the NavMesh layer, and has "NavigationStatic" checked (at the top of the Inspector)?
    2. Is there a discrepency between your MainCamera's FOV and that of the active GameCamera?
    3. Is there any change in behaviour if you change your "NavMesh search direction" (in your Settings Manager) to Radially Outwards?
  • Hi Chris, so I checked all three points. 

    1. Yeah, this is definitely checked.
    2. I've checked all the cameras in my scene and the FOV is set to 36 on all of them. I have three custom cameras and then a MAIN and Background camera. Perhaps worth noting that I started the project as a 3D project and changed the camera to 2.5D. I think it then recreated the Background camera. - could this be an issue? Screenshots in the link below.
    3. I did change this setting but issue was not resolved.


    What i did was I then went the rout of using a mesh as the Navmesh instead of Unity Navigation and then it seems to work fine? 


    Do you have any insight on why this would be?

    Thanks
    William




  • Whether you use Mesh Collider or Unity Navigation for your pathfinding, you still need to have the walkable area covered with a Trigger Collider tagged as "NavMesh" in order to recieve mouse clicks.  The NavMeshes in your screenshots don't seem to have a Collider.

    The NavMeshSegment prefab has all the necessary components - you don't have to use it specifically, but you can at least use it to know what your own collider needs.

    Separately, I notice you're using the Demo_SceneManager asset file - I'd strongly recommend using your own set of Manager assets for creating your own game, so that they don't get overwritten when you update AC.  You can do this by using the New Game Wizard (see Section 1.3 of the Manual).
  • Thanks Chris, much appreciated - still learning as I go but it's an amazing product you created and the support you offer is a differentiateing factor for sure!
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.