# How can I fix Z-fight?

**URL:** <https://forums.unrealengine.com/t/how-can-i-fix-z-fight/1642599>\
**Category:** Asset Creation\
**Tags:** modular, modules, unreal-engine, question\
**Created:** [January 25, 2024, 11:19pm UTC](https://forums.unrealengine.com/t/how-can-i-fix-z-fight/1642599 "2024-01-25T23:19:18Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Longrid](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Longrid](https://forums.unrealengine.com/u/Longrid)\
**Post date:** [January 25, 2024, 11:19pm UTC](https://forums.unrealengine.com/t/how-can-i-fix-z-fight/1642599/1 "2024-01-25T23:19:18Z")

</div>

Please, explaine how build modular house with doors. Without this weird issue.  
I can’t find information anywhere on how to do it correctly.  
I’m trying to build it myself and I can’t build two floors properly.

 ![Modular_Z_Fight](https://d3kjluh73b9h9o.cloudfront.net/original/4X/4/a/5/4a5d15f0df5d41ad6e04dde05e858fb7d09c54c3.png)  
Walls 3m/3m/30cm. Floors 3m/3m/20cm

---

<div class="post-metadata">

**Author:** ![MostHost\_LA](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/mosthost_la/32/907035_2.png) [@MostHost\_LA](https://forums.unrealengine.com/u/MostHost_LA)\
**Post date:** [January 25, 2024, 11:33pm UTC](https://forums.unrealengine.com/t/how-can-i-fix-z-fight/1642599/2 "2024-01-25T23:33:16Z")

</div>

Look at a puzzle piece?

---

<div class="post-metadata">

**Author:** ![Longrid](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Longrid](https://forums.unrealengine.com/u/Longrid)\
**Post date:** [January 25, 2024, 11:44pm UTC](https://forums.unrealengine.com/t/how-can-i-fix-z-fight/1642599/3 "2024-01-25T23:44:22Z")

</div>

Yea  
In this case i need place a wall with a doorway. Walls and floor all overlaps in this place/  
How it build corrctly when i use modular assets?

---

<div class="post-metadata">

**Author:** ![MostHost\_LA](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/mosthost_la/32/907035_2.png) [@MostHost\_LA](https://forums.unrealengine.com/u/MostHost_LA)\
**Post date:** [January 25, 2024, 11:49pm UTC](https://forums.unrealengine.com/t/how-can-i-fix-z-fight/1642599/4 "2024-01-25T23:49:47Z")

</div>

Usually they have to snap in.

Walls are separate and have a 45 deg cut for matching corner pieces.  
Continuos wall panels are usually made in a few flavors - .5m, 1m, 2m, 10m (and or you can actor merge combinations for one offs, if its for light baking).

Doors are floorless holes which sually measure/replace the 2m wall.

All pieces should be base 10 (yes, .5m is base 10)  
All angles should be 45 or 90.

This allows for easy snapping.

A proper modular kit has to be built logically based on many possible architectural shapes.  
(And for good measure probably also throw in sloped ceiclings/walls)

Or, you can put a rug over the doorway floor…  
Like EA or Ubi would do! 😆

---

<div class="post-metadata">

**Author:** ![Longrid](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Longrid](https://forums.unrealengine.com/u/Longrid)\
**Post date:** [January 26, 2024, 12:26am UTC](https://forums.unrealengine.com/t/how-can-i-fix-z-fight/1642599/5 "2024-01-26T00:26:46Z")

</div>

Thanks for the advices!)  
I will try it

---

<div class="post-metadata">

**Author:** ![Nawrot](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/nawrot/32/618260_2.png) [@Nawrot](https://forums.unrealengine.com/u/Nawrot)\
**Post date:** [January 26, 2024, 11:17am UTC](https://forums.unrealengine.com/t/how-can-i-fix-z-fight/1642599/6 "2024-01-26T11:17:24Z")

</div>

Chamfer edges. Something like this:

 ![chamfer](https://d3kjluh73b9h9o.cloudfront.net/original/4X/7/5/b/75bd4ba8391ac90ced9f0c9c7867e8e31b021f9d.png)

So edge of grid (size) is where they intersect.  
Then add about 1uu chamfer.

Since both meshes overlap and go 45 deg immediately, you will not have Z fight or that tiny lines between meshes.
