i finally got sick of being able to jump on my own hitbox, so i set about trying to clean up the collision checking.

although unity provides a layer collision matrix for physics in 2D and 3D, you can only retrieve this as a full matrix through Physics2D, which is very strange. so i made a utility function that generates and caches a matrix for the 3D array, and populates it by going one layer at a time.

this works, and lets me fetch a layer mask for each layer. but strangely, after doing this the physics broke anyways. i've also written code to output the layer mask as a series of bits to help me identify what layers collide with what, and nothing appears to be off. it doesn't really make sense why just having the IgnoreCollision layer mask is any different from having the IgnoreCollision, Hitbox, and Hurtbox layer mask, but it is. i need to do a lot more testing on what the collider believes it's hitting.

daily creative

work on something (gamedev, art, 3d modeling, music, ...) every day

joined 1,815 days ago

2024-12
2024-11
2024-10
2024-09
2024-08

Decade Jam

To help keep members of the Decade Jam on track with their projects!

joined 1,338 days ago