Invalid AABB errors when "smashing" into many rigid bodies

So me and my friend are working on a cube game where you dodge Obstacles and what not, how ever we have came into a very annoying error and cant seem to fix it, i have researched the error a fair bit and i have came to an conclusion that its something to do with axis-aligned-bounding-box, the shard’s of the cube only seem to do it when they go really far or maybe if the are ‘thrown’ really fast i am normally really good at finding solutions.
The Obstacle is a primitive cube/rectangle, when the player hits it, it destroys it self and Instantiates a prefab where it was, the prefab is a cube exported from Blender that has been “shattered”.

This is what i have tried so far:
Setting the RigidBodys to different mass so they don’t go so far.
Some stuff to do with the instantiation.
Deleting the Shards when the get a certain distance from their origin.
Checking Convex on the MeshCollider of every shard.

My only other guess would be something to do with rotation.
I have also read that these errors can happen from the Particle System (but my/friends game doesn’t have a Particle System in it yet)
I would really appreciate some help.

Here are some images:


______

The images are not in sync with each other.

1 Like

Guess i’m having the same problem. I am new to unity and tried a tutorial series form ‘Brackeys’ on youtube. I had the same bug as you and his completed project has the same bug. It looks a lot like the game you created. Here you can download the project: How To Make A Video Game | Dev Assets .

It happens when my player collides with the ground at a certain angle. It can’t set the transform.position of main camera and the game freezes/crashes. In the console there will be 999+ errors but the first one will be:

transform.position assign attempt for ‘Main Camera’ is not valid. Input position is { NaN, NaN, NaN }.
UnityEngine.Transform:set_position(Vector3)
FollowPlayer:Update() (at Assets/Scripts/FollowPlayer.cs:11)

I tried several things already but nothing worked. If you or anyone else knows can fix this, please tell me…