Problem with floor generator.

Hello everyone. So, im trying to do an endless runner, In order to achieve this, i have created some prefab cubes(that is a floor in this case, because my player moves on it) that are generated as the player moves, and of course, the cubes that are behind the player get erased. The problem that im having is that once my player exits one of the cubes and, enters the next one, sometimes a collision gets triggered, that if the player is moving fast, sends him flying away or bugs it.

I really dont know what is happening here. I´ve tried making a physic so that the ground has no friction nor bounciness However this still happens. What could possibly be? thanks,Hello everyone. So, im trying to do an endless runner, In order to achieve this, i have created some prefab cubes(that is a floor in this case, because my player moves on it) that are generated as the player moves, and of course, the cubes that are behind the player get erased. The problem that im having is that once my player exits one of the cubes and, enters the next one, sometimes a collision gets triggered, that if the player is moving fast, sends him flying away.

I really dont know what is happening here. I´ve tried making a physic so that the ground has no friction nor bounciness However this still happens. What could possibly be? thanks.

This is caused by the same reason this happens in 2D:

A solution would be to not use the cubes colliders as the floor at all but a consecutive surface. If the surface is all flat (same height) you don’t even need collision, you can just stop the rigidbody from going below the “floor” in code. If you need falling through holes a raycast from the player might do.

Your player has a cube collision ? it would probably work better if it has a Capsule collision