Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Twin-stick shooter movements

Discussion in 'Animation' started by kasperfm, Feb 4, 2015.

  1. kasperfm

    kasperfm

    Joined:
    Nov 20, 2013
    Posts:
    3
    Hi everyone :)

    I'm working on a top down twin-stick-shooter, but I have some problems.
    I can't figure out how to make a nice and fluid movement and aim controls. I have animations for forward, back and strafe movements in Mecanim, but the current functionality in my project is pretty bad...

    So I want to hear if anyone around here know how to make some nice controls for a twin stick shooter, where you can run in any direction and shoot in another at the same time. (Like DeadNation:
    )

    I can't post my project here, since it's a commercial project, but if anyone know a method, have some code pieces, or know something on the assets store that can help me out, that would be great :)

    Thanks
     
    seansteezy likes this.
  2. Mecanim-Dev

    Mecanim-Dev

    Joined:
    Nov 26, 2012
    Posts:
    1,675
    Split your state machine into two layer
    the first layer should control the movement of your character
    the second layer should have an AvatarMask to affect only the upper body of your character and it should control the aim
     
    seansteezy and theANMATOR2b like this.
  3. kasperfm

    kasperfm

    Joined:
    Nov 20, 2013
    Posts:
    3
    Yea, but I don't know how to control it correctly with my XBox360 gamepad :/ Can you point me in a direction?
     
  4. theANMATOR2b

    theANMATOR2b

    Joined:
    Jul 12, 2014
    Posts:
    7,790
    If the gamepad is what's causing you trouble - drop it and get the game play functioning first with wasd and mouse. Once you have the movement working update the controls from wasd and mouse to your gamepad.
     
  5. seansteezy

    seansteezy

    Joined:
    Nov 28, 2013
    Posts:
    122
    Haha I'm doing the same thing right now... just like Dead Nation :)