C
C#2y ago
male

❔ My "Player" cant jump on the edge of a block

Hi , Im a beginner with unity and i have a problem that makes my 2D game not so enjoyable, the problem is that when "Player" is on a very edge of a block he cant jump even when he is still on a collider of the block, but when i move a bit to the middle he somehow can jump but not on the edge. I dont know if its a problem in my codes or somewhere else. Help would be much appreciated 🙂
6 Replies
Anchy
Anchy2y ago
It sounds like you are using a raycast to detect the floor, you may be interested in doing a boxcast instead.
Anchy
Anchy2y ago
Anchy
Anchy2y ago
you can see here if we use a raycast on an edge, we can't detect the ground
Anchy
Anchy2y ago
Anchy
Anchy2y ago
with a box cast we get a hit
Accord
Accord2y ago
Was this issue resolved? If so, run /close - otherwise I will mark this as stale and this post will be archived until there is new activity.
Want results from more Discord servers?
Add your server