Forum rules - please read before posting.

Player Crouching in Unity 6.2

Hi there,

I'm following the 2.5D game tutorial to get acquainted with Adventure Creator's mechanics.

There've been some changes to Unity since the tutorial. Following the tutorial as closely as possible, I can't seem to make crouching work.

The one change from Unity 2018 appears to be how Unity handles input:

In the tutorial, the instructions are to add an input axis for "StealthMode." This input setup no longer exists in Unity 6.2.

Instead, I have tried:

  1. Using the preexisting 'Crouch' action under Project Settings > Input System Package > Player > Crouch (mapped to the 'c' key)
  2. Creating a new action called 'StealthMode' under Project Settings > Input System Package > Player (mapped to the tab key)

I have not been able to get either option to work; the player will not crouch when the key is pressed during gameplay.

When I manually toggle the "IsCrouching" parameter during gameplay, the player crouches properly. So at the very least, the animation and parameter settings are correct.

I have the variable and action list configured exactly as in the tutorial.

I'm just not sure how to get the key binding to actually make the player crouch during gameplay.

Any help is appreciated!

Comments

  • Welcome to the community, @CDaddy.

    With Unity 6.2, the new Input System becomes the default method of handling input. The tutorial uses Input Manager, which can technically still be used - enabled via the Project settings page - but it's recommended to use Input System going forward.

    In order for AC to work with Input System, however, the Input System Integration template must be installed.

    You can install this template from the New Game Wizard - you can choose Modify existing on the first page to install it into an existing game, but it should be suggested by default when creating a new set of Managers.

    This template relies on its own Input Actions asset - which won't necessarily be the same one accessed in your Project Settings -> Input System Package.

    Instead, it'll be the Controls asset inside your game's Input System subfolder in the Project window. That'll be the one to edit for AC to receive new inputs.

  • Thanks for the welcome, Chris.

    Followed your instructions, edited controls in the Project Settings -> Input System Package Controls asset, and the crouch / stealth mode function is now working.

    Grazie!

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.