Forum rules - please read before posting.

Edit Mecanim for Player

edited August 2014 in Technical Q&A
Hello,

How would i go about editing the Mecanim script for the player to allow for crouch idle, crouch to sneak, then on key press crouch to normal idle.

As of now i have a working controller for standing idle with walking and running transitions, but id like to be able to go from standing idle to a crouch then be able to sneak until i press the crouch key again.

I assume this would be done with a bool, but i cant get it to work because i cant make controls for any new bools on the players script. I would also need the players collider height to be 1/2 smaller obviously so that the players collider would be relative to the players height at the time of sneaking.

Comments

  • It should be possible to do this in a separate script that sits alongside the player script.  The idea behind AC's mecanim integration is that - unlike the Legacy implementation - it leaves most of the control up to the user.

    AC will output the player's move speed as a float, for you to use in your FSM, but you can use that in combination with "crouch bools" etc to customise your movement.  Essentially, you'd want a separate script that controls a bool parameter in the same FSM (for better integration, you'd do a check for the StateHandler script's gameState value - you want it to be Gameplay).  Hopefully, it can all be done alongside AC - without needing to edit AC itself.
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.