#2D collision | ground check

1 messages · Page 1 of 1 (latest)

trail pelican
#

new thread :)

thin pebble
#

What shape is your 2d character?

split pollen
#

probably create a LayerMask, it might be hitting itself

thin pebble
#

(collider wise)

trail pelican
#

it's a square

thin pebble
#

Seems questionable to use CircleCast instead of BoxCast. Try seeing if it makes the collision more reliable.

split pollen
#

It’s as easy as public LayerMask mask; then in the circle cast (origin, radius, direction, mask)

trail pelican
#

Okay, I just did that and it still doesn't work.

thin pebble
#

Do you have infinite jumps or no jumps now?

trail pelican
trail pelican
trail pelican
#

what's distance if you have radius?

foggy tartan
#

It's a Cast

#

not an Overlap

trail pelican
#

not sure I get you

foggy tartan
thin pebble
#

Make sure to assign the Layer Mask varaible in the inspector to the Layer Mask the ground uses.

split pollen
#

Oh wait

#

I didn’t read 😅

trail pelican
#

I have done that, still infinite. I'm starting to think that the empty areas of the tilemap also count in the layer, creating the infinite jumps

#

i'll send a screenshot maybe that'll help

#

My thought is that the middle area wich shouldn't be ground also counts as ground

trail pelican
#

@thin pebble ?

#

I might be completely wrong on that, so if you have another hunch, let me know please

thin pebble
trail pelican
#

well, have you worked in 2d with tilemaps before? if so, what's your workflow?

thin pebble
#

It's been a long time since I made a 2d game. I'll set something up real quick then describe how I did it.

trail pelican
#

Much appreciated :)

#

@thin pebble actually, sorry I haven't told you this before, but if you think calling and me screensharing would be easier, we can do that as well

thin pebble
trail pelican
#

Should we DM vc? We might get interrupted here