# Seams between floor tiles produce collision/physics artifacts when rolling over them

In my project I am shooting and making balls roll on the floor using the built-in physics system. Everything was working nicely while I was using a big seamless plane as my floor, but the moment I started building real levels with floor tiles the balls began “hitting” the seams between the tiles and jumping around. I have tried placing the tiles as well as I could, with a little gap between the tiles or with a bit of overlap with no difference. I have also tried using simple (bounding box) and complex collision for the individual tiles. Here is an example pic:

As you can see, the ball trajectory is traced in green and there are two tiles in the floor. When the ball rolls over the seam between the two tiles it suddenly jumps into the air.

Any ideas? Thanks.

Did you ever find a solution to this issue? I’ve run into it myself and this unanswered question is all I can find on the matter.

I didn’t find any solution and it seems it is a physx issue. I ended up developing my own physics engine.

Here is an article discussing the issue and offering some workarounds (and a real solution for Box2D-based Unity games): Ghost vertices - Box2D tutorials - iforce2d

For the sake of spreading the information; I did find a thread discussing the subject and according to staff the problem is tied to a limitation in the engine, and there isn’t really anything that can be done about it.

I found a solution for this in Unity, I’m sure it’s also applicable to Unreal:

Make a giant collider on top of your “bad seams colliders”. This is the collider you will actually collide with. It can be much larger than the actual area of the If the seams collider is a Mesh collider, typically the “good collider” will be the same mesh with a convex simplification (not sure how to do this in Unreal, but it’s a checkbox on the mesh collider in Unity). Otherwise just make a giant, simplified box collider overtop of your bad seams. When your on top of a collider with seams, you collide with the “giant” collider, otherwise you fall through the giant collider.

In detail:
Put the convex/giant collider on a “seam fix” layer, and the other collider on a “seam bad” layer. Have 2 physics layers (not sure how these work in Unreal) for your player. One is the regular player layer, the other is the “player seam fix” layer. Setup your layers so your player layer collides with “seam bad” but not “seam fix” and “player seam fix” collides with “seam fix” and not “seam bad”.

In Update, use a BoxCast/SphereCast/RayCast or w/e to determine if your on top of the “seam bad” collider, if you are switch to “seam fix” else stay on player regular. Switching to player regular when your not on the “seam bad” collider ensures that you fall through the simplified collider when your not touching the “seam bad” layer.

The “seam fix” layer is a simplified collider without the seam problem, so this script essentially makes it so you only collide with the giant collider if your on top of the bad seam collider and allows you to fall through the giant collider otherwise.

It’s working very well for my game with a physx rigid body character controller.

Here’s an update on this situation, for future viewers.

There is an option in the Project Settings called Contact Offset. Project Settings → Engine-Physics → Simulation. There are three settings for contact offset. Contact Offset Multiplier, Min Contact Offset, and Max Contact Offset. I lowered the min and max offset values to get a much better response in the collision behavior.

Here are my settings:

• Contact Offset Multiplier = 0.02
• Min Contact Offset = 0.01
• Max Contact Offset = 0.05

My settings are just a shot in the dark. They may not be the most optimal settings, since I actually do not completely understand what the meaning behind each value is. The matter of the fact is that they will eliminate this ugly bouncing on collision mesh seams that happens by default.

Thanks to some lovely folks on the forum for discussing a good solution: Rolling ball jumps on flat surface - Physics - Unreal Engine Forums

1 Like

Im using ue5.1 and this issue is still happening to me when I try to push a box on a seam between tiles! “Min / Max contact offset” have no effect as well… Why is this still happening on floor tiles with a seemingly perfect collision?! I tried many things with no luck… and having to change the collision to a single plane is not the best anwser for me… Is this a bug and can it be fixed?