to detect when my player is grounded as to perform a jump
my player can crawl, and i want to put him in a passage that he cant stand in, at the moment he can though.
My idea was to have the ground collider where he has has to crawl, layerd as MustCrawl. I couldnt work out how to get the above raycast to check for another layer, and i thought it might get messy.
So i created a similar return bool (Is that what you would call it?) called mustCrawl.
but when i print (mustCrawl) its always false., regardless if im on the MustCrawl layer or not.
am i on the right track here? any help appreciated.
There is a direction parameter which tells the cast which direction you would like to look.
Now, the groundcheck and the headcheck are virtually the same, just the direction is the opposite. I will leave it to you to find out how you can check it.