Forum rules - please read before posting.

Character under direct control keeps moving to top left

I don't know if this is an AC problem, a Unity problem, or a hardware problem, but since recently when I have the controls set to direct, the character keeps moving to the top left, unless I press down another direction key. When I release it, the character moves to top left again.
I tried taking every USB device besides the keyboard out and tried using a different keyboard but nothing helped.
It was briefly fine yesterday after switching to point and click and switching back, but now that doesn't fix it anymore.
Any clues? How could I go about debugging where it comes from?
(also when playing games, I have no problems with the keyboard. It's only while hitting "play" in Unity, so it's not a key that is stuck)

Comments

  • With first person controls, the character also keeps moving, so it seems a keyboard input problem. None of the mouse controls have issues

  • I'll need to learn more details about the situation.

    What are your AC/Unity versions, is the character taken from the Sample content, or have you built them using the character wizard? Any screenshots you can share of both your Settings Manager, and the character's full root Inspector, will help.

    This might be a case of them moving along one axis, rather than a screen direction. If you pivot the camera 180 so that it's viewing the walkable area from the other side, do they still move top-left, or along the same world-space direction?

    We can determine if this is an issue unique to your character by dropping the Demo game's Player prefab, TinPot, into the scene. Do they have the same behaviour?

  • Am using Unity editor version 2022.3.20f1
    AC version 1.21.4

    If I rotate the camera 180 around the z-axis, movement is also to top left. For Y and X it's bottom left. (so with all rotation at 0 or 180 Z the character is moving further back on the sorting layers, with 180 on Y and X it's moving forward in the sorting layers)

    I made the character through the character wizard. I tried making a new player character, made that the default, and I am still getting the behaviour so it doesn't seem to be the character that's the problem.

    I'll try and get some screenshots up

  • I have started a new project, loaded the 2D demo, and it happens there as well.
    I am going to try and get this on different hardware and see if that helps.

  • I copied it over to a laptop and ran it again. There it works fine.
    I'll have to find out why it does this on my pc as it doesn't seem to be any usb device, but at least it doesn't seem to be AC.

  • I copied it over to a laptop and ran it again. There it works fine.

    As in: the same project, which wasn't working on PC, works unmodified in the laptop? If so, then yes - I'd say it's likely not AC-related.

    It may well be a Unity issue, but one thing you can do is print the raw input values into the Console to see what input is being read.

    AC gets its direct-control input from the PlayerInput script's CreateMoveKeys function (around line 1340). Placing the following at the top and bottom may shed some light:

    Debug.Log ("H: " + h + ", V: " + v);
    
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.