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

Input Mapping For Extensive Controllers

Discussion in 'Game Design' started by ippdev, Jun 7, 2015.

  1. ippdev

    ippdev

    Joined:
    Feb 7, 2010
    Posts:
    3,850
    I am wondering what keys and/or 360 gamepad buttons to map to what actions. For example I have a StanceToStanceMode for combat and a FreeNavMode for basic walk- run- turn- idling. These both use the WASD./up-down-left-right keys. You can toggle to FreeNavMode using the F key and to StanceToStanceMode using the C key. I imagine on gamepads this would be the right joystick axis and the bumper buttons. LookAround is performed by RightMouse in both modes (left joystick axis?). LeftMouse controls sword swings in StanceToStanceMode (close quarters combat). Not sure what to control with LeftMouse in FreeNavMode (UI perhaps?). Q & E keys control pivoting in StanceToStanceMode and TurnInPlace in FreeNavMode. The R key toggles whether you go from Idling to Run directly in FreeNavMode or uses the Speed parameter to move from Walk to Jog to Run.

    I have a FightMode that holds several kicks and punches that can only be accessed from StanceToStanceMode. I am in a quandary as to how to use these fight moves. I was thinking I could use a method where if the K key was pressed down currently the WASD keys could choose between up to ten kick moves. W-A-S-D-WA-WD-WS-AS-AD-SD. Same with punches but using the P key. Let the key up and you return to the previous Stance. Conversely I could place a button pad in the UI and if the LeftMouse is down over the type of FightMode move - punch or kick - it executes accordingly. I could also use the number keys to execute fight moves in StanceToStanceMode.

    I have an ObstacleNavMode that uses various jumps, leaps, ducks, climbs based on Speed and Direction in FreeNavMode. However I am again in a quandary about how to trigger these from key or mouse. For automatic obstacle nav I can set trigger on obstacles that will tell the controller which one to use..For example I can place a trigger on a set of stairs with the Z+ axis pointing up and the Z- axis pointing down the stairs. Or place a trigger on a wall that informs the controller the best move to traverse the wall...etc. However some users may wish to control these moves for other reasons. I was considering as above to use the number keys, though this may cause confusion in remembering the mapping by the player. In this consideration what would be the optimal ObstacleNav triggering?

    In StanceToStanceMode blocking is triggered by holding down the X key and the type is determined by mouseScreenCoordsXY are -High-Mid-Low, Left-Center-Right. SwordSwings in the 8 main directions starting CW at the top - Hack-DiagonalSlash-Slash-DiagonalUpperCut-UpperCut-ReverseDiagonalUpperCut-ReverseSlash-ReverseDiagonalSlash - are controller by LeftMouseDown mouseMoves that gets direction by comparing prevMousePosition to currMousePosition. But..I also have ten sword attacks that are not hack and slash moves. Perhaps trigger these by holding down the Z Key?

    I am seeking the most intuitive method to combine all of these into a controller schema that the player/user won't have to RTFM and provide a quick switching combat and navigation controller that will most widely fit int any number of gameplay scenarios. As well, gamepad mappings need to have the same simplistic complexity. Any comment or suggestions, experience etc. is quite welcome whilst I wrap my brain around this.