No announcement yet.

Twin stick shooter rotation default

  • Filter
  • Time
  • Show
Clear All
new posts

    Originally posted by EvilCleric View Post
    The problem the OP has, is most likely related either with the sensitivity of the stick or something he changed without noticing. However, even without the gamepad and just using keys, he still has the same problem (no input => player always ends facing +X), which is weird and have been unable to duplicate.
    I figure it's that the joystick is putting in a vector of (0,0) and so the mesh returns to what would be a "default" direction for it.
    My character used to always face -y on the axis when released. I had to make it only accept input when the sick was above certain thresholds. And trying to find a sweet spot.
    I figure when I do that and release the stick it snaps a little bit faster to one of the axis which is why if i'm close to 12 o'clock, it will snap to the +y and if i'm close to 3 o'clock it snaps to +x.

    Here is my code as promised.
    Also did a recording of how the facing works, and had it snap a few times to show.
    Attached Files