Search Unity

GroundCheck not working

Discussion in '2D' started by S3Critsss, Jan 19, 2020.

  1. S3Critsss

    S3Critsss

    Joined:
    Jan 6, 2020
    Posts:
    111
    I'm making an FPS and im adding movement but when i add the player's groundcheck to the Transform the player falls through everything.
     
  2. eses

    eses

    Joined:
    Feb 26, 2013
    Posts:
    2,637
    @S3Critsss

    "I'm making an FPS and im adding movement but when i add the player's groundcheck to the Transform the player falls through everything."

    You do realize, you don't provide any context to this problem;

    How have you created your moving object (= character)?

    Are you using some pre-made asset, Unity assets or some custom setup you created?

    What does your code look like?

    List goes on... besides the fact that FPS (first person shooter) games are seldom 2D games so this probably should have been posted to general scripting area.
     
    bitlysub2anf likes this.
  3. bitlysub2anf

    bitlysub2anf

    Joined:
    May 8, 2020
    Posts:
    71
    @eses
    How do make a ground check?
    [Project Info: 2D, for Android, 3 UI buttons: Right, left and jump, player infinitely jumps. I want the player to jump only when he is touching the ground, here is the project picture]
    Annotation 2020-05-30 175458.png
     
  4. temwed42

    temwed42

    Joined:
    Jun 1, 2020
    Posts:
    1

    This video has exactly what youre looking for.

     
  5. bitlysub2anf

    bitlysub2anf

    Joined:
    May 8, 2020
    Posts:
    71
    Timestamp please