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
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.
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.
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.
I move the cursor properly with the keyboard/mice overriding your delegates.
These are my functions and overrides:
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.
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.
Cheers.