Forum rules - please read before posting.

Draggables not working for Touch Screen in AC 1.84.3

I have had to update to Unity 6 and AC version 1.84.3 in order to update my Android build which supports the new Google Billing system... very frustrating.

But, in the midst of that, I resolved all the other bugs except for draggables. You may remember we tackled an issue with this here:

https://adventurecreator.org/forum/discussion/14880/draggables-slow-on-ios

Now, I'm running into an even worse issue. You can see a full breakdown in this video here:

To summarize in text, in the Settings Manager, when "Input Method" is set to "Mouse and Keyboard" draggables work. When "Input Method" is set to "Touch Screen" they don't work at all, even when changing nothing else (as seen towards the end of the video).

What do you think is going on here? Another issue with the HeldObjectData script? Or something else? Let me know. Thanks!

Jeremy

Comments

  • What version were you updating from for which this was working, and are you using Input System or Input Manager for input handling?

  • I may have recreated this.

    This won't be an exact fix - more a means to check we're on the same issue. But if you open up AC's StateHandler script, find the line:

    KickStarter.playerInput._FixedUpdate ();
    

    and move it out of the FixedUpdate function, to the bottom of the LateUpdate function above it. Is the behaviour then consistent between both input methods?

  • Hey Chris, thank you for the response. I am using the InputManager for my PC, Mac, Linux, iOS, and Android builds. So, yes -- the InputManager, not Input System.

    I did as you said; I moved KickStarter.playerInput._FixedUpdate (); from FixedUpdate to the very bottom of LateUpdate. No change. Issue persists. HOWEVER, the dragging movement with "Mouse and Keyboard" Input Method is much smoother. That's interesting. But not helpful here.

    Here's something I figured out -- the dragging input isn't even being registered. I had this suspicion because in the video you can see an icon appears when dragging actually occurs with "Mouse and Keyboard" selected, and it's not there at all when "Touch Screen" is selected as the Input Method.

    You can actually see this in the console. In the HeldObjectData script, in the public method Drag (line 86), I put this Debug.Log("Is Dragging");. It registers in the console for "Mouse and Keyboard" but not at all for "Touch Screen". So, for some reason the input isn't being detected by the HeldObjectData script at all.

    As for the AC version I upgraded from - 1.79.3. Quite a leap, but I didn't have a reason to update until I updated to Unity 6, which I just had to do. I wanted to grab the latest AC version since Unity changed a bunch of syntax like "FindObjectOfType" or whatever in Unity 6, and I was certain that you had updated all of that in AC.

    I'm sure we'll sort this out. Let me know what you think!

  • Thanks for the details. What's odd is that Touch Screen should generally be equivalent to Mouse And Keyboard when testing in the Editor, so it's the same mouse input code that's running in both cases.

    If you're placing Debug.Log statements down, try one at the top of PlayerInput's OnGrabMoveable and OnDropMoveable functions. We'll need to see if it's either a case of the Grab one not being called, or both Grab and Drop being called in the same frame.

    If it's the former, share the logs in full - stacktrace included.

  • edited July 30

    OK. I fixed it... at least in my project. First, I did as you said. I put the debug statements in both OnGrabMoveable and OnDropMoveable. When "Mouse and Keyboard" are selected, they both register, but when "Touch Screen" is selected... nothing at all.

    Now, all this drag business got me thinking about the "Movement Method". When I updated the game to Unity 6 and the latest AC, I had to go through and adjust all my AC managers for some reason. Not everything, just some things... like every single menu that uses TMP had to be toggled back on.

    When setting things back up I accidentally set the "Movement Method" to "Direct". I guess I was using "Point and Click" before... not because the Player actually moves in my game, but so I could have the Click Marker.

    **Anyways, setting the "Movement Method" back to "Point and Click" solved the issue for me! **

    But it seems that when "Movement Method = Direct" && "Input Method = Touch Screen"... draggable objects don't work.

    I appreciate you looking in to this. I hope isn't wasn't all for naught! Thanks again!

  • No problem, thanks for the follow up!

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.