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
Get Ship Control
Ship Control
Build your ship. Tweak your ship.
More posts
- 1 year since dead anniversaryMar 31, 2019
- Generic building controlsApr 01, 2018
- Premature optimizationFeb 22, 2018
- 3d building and movementAug 29, 2017
- Teleportation between sectors in multiplayerJul 26, 2017
- Future networking updateMay 31, 2017
Leave a comment
Log in with itch.io to leave a comment.