Why my RayCast2d draws arround camera?
I've been struggling with Raycast for a while. As you can see on next Screenshot, I wrote a raycast function in order to know if im hitting ground or ceiling. if im hitting ground, im able to do double jump again, if im hitting ceiling, double jump should not be allowed until i hit ground. I wrote a code that cast a ray down to ckeck ground, but I just cant make it work. I don't know why the raycast draws arround camera as you can see on next raycast debug.
raycast should be a straight line down, and also layer mask doesn't work... thay's why i have to offset the startpoint outside player... Here is my code ..
Could somebody help me? Thanks a Lot (I dont care about the layer mask, I just want to figure ot about the ray direction)
Your answer
Follow this Question
Related Questions
How to Raycast 2D Diagonally instead of Horizontal on a Platformer game. 0 Answers
Inconsistent Jump Heights 1 Answer
Best ground 2D ground check strategy? How to detect if a object is touching the top of a layer? 0 Answers
Enemy is shooting the opposite direction of player 1 Answer
Handling Slopes 0 Answers