the collider thing


Unfortunately, collision detection for mesh colliders in Unity is too inaccurate. if one the colliders is scaled, the distance at which collision will be detected is also increased, but only if one of colliders participating in the collision is a mesh collider.

On the picture below mesh collider detects huge overlap this big box collider, but everything is just fine with smaller one. Note that there are 2 frames that demonstrate collider shape at different scale and the smaller one if .97 units scale, so there is literally .03 units gap in between smaller mesh collider and the others, but collision is still detected between it and the big one. There seems to be no to set mesh collider scale the way, that it will properly handle simultaneous collisions between blocks scaled differently, and it's not only about blocks being created, but also about all the rest too.


At least this just does not happen for primitive colliders so in this case collisions resolved precisely.

This means that i have to stick with the older idea of using compound colliders instead like on the picture below and use some math to internally scale and rotate individual primitive colliders to make them match the mesh.


Once it will be done, scalable armor will be returned to the game, but after other things. I just don't want to put half a day into that right now, I did that for one cannon and the shield and I'm too bored with this to even copy-paste it to the other 2 cannons, so i just temporarily removed them.

Files

build-linux-x86(exp-11).zip 55 MB
Jan 03, 2018
build-win32(exp-11).zip 50 MB
Jan 03, 2018

Get Ship Control

Download NowName your own price

Leave a comment

Log in with itch.io to leave a comment.