Scenario: I have the “ActionMap” “PlayerGroundAM” that contains two actions: “Prone” and “AimAndMove” , among other Actions in the ActonMaps .
I want to use the same key to switch between both actions.
I need to control which action is active at a given time (for example, Prone when you are Prone and AimAndMove when you are not).
ActionMap (AimAndMove) behavior when using keys (ArrowUp or Arrow Down):
Since the behavior of the “arrow down” key when used in “AimAndMove” is to allow aiming while moving in vertical directions, only while moving, as in the counter, if you hold down a direction, let’s say “arrow right” it will move to the right, but if I hold the same key and then press “Arrow down”. What do you think will happen? Well, it will point in one direction while moving, you understand.
ActionMap (Prone) behavior.
This simply makes the Player execute the Prone animation, meaning that it can do Prone!. It only needs the Player to be still, without any physics, idle, idle!, if it is still and presses down. What do you think should happen? Well, it should do Prone.
To get out of prone, just press any arrow key, it can move naturally horizontally (MoveOnGround) or repeat the cycle of moving pointing (AinAndMove).
As you can see in the picture, I have few ActionMaps, related to PC-Scheme, only PC, I can Move horizontal (MoveOnGround
) , and move horizontal while aiming (AimAndMove
) in 8 direction! that is Crucial! (Like A contra NES).
I am very happy to the movement and Aiming. I can move left-fight and if I press (Up-Down) I can Aiming in 6 directions , this is exactly that I want!. The problem I am stucked now is the “prone” actions…
I need to “Prone” only and only if the player is idle (not movinng) why? because if he press “down” he is aiming certain directionr. So (Up-Down ) keyaboard are mutuable in terms of easy comprehenssion.
when the player is “idle” with no force even… if I press “prone” (arrow down) I must Prone! and that! not happen!..
I also attached the relevant code , special the “input class” that I am using for this approach.
PlayerInputActionsController.cs (10.5 KB)
also I attached the PlayerMomventGround as pseudo-business logic
PlayerMovementGround.cs (3.5 KB)
The behaviour of the “AinAndMove” Action ! here it is :
I only interesting in 2D games. I pretend to to use New input system for basic small games. As you can see Aiming and move is critical for this game
… I need to prone now, using the same button, differnet actionmap… I think Inputsystem must be official and accesible in terms of classics games…I need Unity need that extra force. I want to hear suggestions/solutoins from people who really experience on game dev and input system, do not waste my time and your time.




