- Home /
FIrst Person Controller: How to start "grounded"?
I have this annoying landing sound effect triggered each time I start my game. Through the debug.log, I've seen that the character start the game flagged as "not 'isGrounded'". How Can I do to modify the unity fps script so it start as grounded, which seems to be what could solve this annoying sound effect?
Solved it by adding:
if (Time.time > 1f) { m_PreviouslyGrounded = m_CharacterController.isGrounded; }
Answer by KenanTheFab · Oct 30, 2018 at 07:14 PM
Your character could be starting slightly off the ground, but (Disclaimer, I haven't used the fps script that unity brings.) you could maybe add a boolean that is false until you make contact with the ground for the first time, and the next time you hit the ground, and the boolean is true, it plays the noise?
edit: Or a simpler way would just to add a Start() or Awake() and set the grounded checker to true there :)
Your answer
![](https://koobas.hobune.stream/wayback/20220612181235im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
Multiple Cars not working 1 Answer
Distribute terrain in zones 3 Answers
Create a object in front of the player 1 Answer
PauseMenu - FPS Camera still moves when in PauseMenu 2 Answers
PauseMenu - Camera moves in pausemenu 0 Answers