Fatal crash (pushing iron chunk with big cell)

I will try to dive into code but I wouldn’t conciser myself an expert in any shape or form.
There is a possibility that this is an engine limitation related to the way plane is calculated but don’t quote me on that I’ll need to learn how to code in order to give any confident answer

We only use the following from Godot engine:

  • A plane primitive
  • It has a shader on it
  • We dynamically create a texture

Everything else regarding positioning etc. is in C#.
With the previous approach where we used a bunch of planes that were dynamically positioned to provide continuity, we had just a tiny little bit of graphical non-interpolation between those planes. That’s why we moved to using a single large plane so that there is no discontinuity anywhere near the player in the clouds.

I realised that errors can be connected. Error during spawning of players cell could cause second one later on. Every crash happened during cell growing as a result of collecting/generating compounds. This alone suggests that there’s a mistake in organell scaling and spitting. I completely missed a possibly of growth stage of organells being an ongoing part of gameplay each time. Every error appeared only with not fully developed big cells. If I’m correct it’s caused by rapid bit uneven growth of organelles causing engine to get confused by holes inside the cell.
I will add some “art” to illustrate this in the morning.

left to right order

  1. is a fresh spawned cell

  2. is a cell that grew outer organelles but didn’t grow inner one yet(engine should handle that)

  3. is irregular growth of organelle first grew black bigger organelles than red one but there’s not enough space for it

I don’t think this is the reason of the bug but I’d rather say something stupid than not mention it and later realize that this was relevant