Forum rules - please read before posting.

Strange Cursor behaviour

Hello,
I've changed my Input method to "Keyboard or Controller" and I'm having some issues with the cursor itself, I move it correctly by using it's delegates, but when I click to move into a navmesh point the logic takes the invisible mouse position to raycast from instead of the cursor one, same goes for the menues but not hotspots.

Is it possible to set all cursor based instead of system mouse?

Thanks in advance.

Comments

  • One ploblem solved :P, the navmesh now works properly but still I can't get the UI working with the AC Cursor.
  • edited January 2018
    Which delegates, exactly?

    Unity UI relies on the system cursor unless you write a custom EventSystem to read another position, but AC Menus rely on AC's internal mouse position.  This can be overridden with the InputMousePosition delegate.
  • InputGetButtonDelegate
    InputGetButtonDownDelegate
    InputGetButtonUpDelegate
    InputGetAxisDelegate
    InputGetMouseButtonDelegate

    Since my settings are "Keyboard or Controller" I translate the mouse movement into an Axis movement, does AC Still take InputMousePosition even if "Keyboard or Controller" is checked?

    How should I "fake" an axis as the mouse position then?

    Thanks.
  • edited January 2018
    Apologies - no, it doesn't read that if using Keyboard Or Controller input.

    In that mode, the cursor is translated using the CursorHorizontal / CursorVertical input axes, rather than taking a specific point on the screen.  Are those the inputs you're overriding with InputGetAxisDelegate?

    Could you show an example of what exactly isn't working?  It's not clear if this is because AC doesn't register the cursor's position, or the click (which relies on the InteractionA button in this mode).  It's also the case that, when the game is paused, menus in this mode are controlled directly rather than moving the cursor.
  • Hello Chris, thanks for answering,

    I move the cursor properly with the keyboard/mice overriding your delegates.
    These are my functions and overrides:

    image
    image

    The problem is that UI elements take the system mouse position rather than the AC Cursor itself, all the UI elements but the native AC elements (hotspots, menues etc)

    So my apologies, it'd be not a strange cursor behaviour, my explanation was inacurate.

    I'd like to know if there is a way to get ACs cursor position so I simulate the UI Click, sorry for extending the question itself.

    Thanks in advance.
  • Again, if your Menus are Sourced with AC, then they should rely on the AC cursor's position.

    If Unity UI, you'll have to rely on a custom Event System to get UI components to react to a manual position, because by default they'll react to the system cursor.  That's not strictly an AC issue, but you should be able to get some advice on the Unity forums.
  • I'll give a try, thanks for the explanation and patience :)
    Cheers.
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.