Posts Tagged ‘ crouching ’

Character Crouching setup in FPS or Third Person Adventure Game

Any person who have used Unity have also tried their hand in making a FPS/TPS game. Unity giving the inbuilt FPS Character Controller makes it as easy as just creating a plane and draging the Character Controller from the Standard Assets folder to your screen and voila we have a working game with our character in it who is free to move anywhere on the screen.
Even though Unity has an inbuilt Controller Movement Script but at the later point of time you might want to use your own character Script for the character movements.

As you do that you might achieve the basic character movements, jump, gravity etc but the problem where I faced was on the crouching or sliding ability of the character.
I had all the animation setup done for the character such as Walk, Jump, Sprint, Crouch/Slide but when tested, all the setup was working properly except Crouch. When I looked into the problem I noticed that it was still colliding with the enviornment which is above the charcter when in crouching mode and after some brain storming I found out that it is because we need to adjust the Character Controller to shrink in respect with the character animation.
Continue reading