# Weird tilemap layering

**URL:** <https://forum.defold.com/t/weird-tilemap-layering/25329>\
**Category:** Bugs\
**Created:** [July 23, 2018, 5:28pm UTC](https://forum.defold.com/t/weird-tilemap-layering/25329 "2018-07-23T17:28:59Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![JustAPotota54](https://forum-defold.b-cdn.net/user_avatar/forum.defold.com/justapotota54/32/12344_2.png) [@JustAPotota54](https://forum.defold.com/u/JustAPotota54)\
**Post date:** [July 23, 2018, 5:28pm UTC](https://forum.defold.com/t/weird-tilemap-layering/25329/1 "2018-07-23T17:28:59Z")

</div>

I have two tilemaps (a wall and a floor) inside a game object. The floor is at the normal angle, but the wall is at a 50 degree angle on the x axis. For some reason, at certain angle, the wall will be displayed in front of the floor.[Pictures because I don’t know how to display them in the post](https://postimg.cc/gallery/3cexnztda/)

---

<div class="post-metadata">

**Author:** ![britzl](https://forum-defold.b-cdn.net/user_avatar/forum.defold.com/britzl/32/23_2.png) [@britzl](https://forum.defold.com/u/britzl)\
**Post date:** [July 26, 2018, 4:32am UTC](https://forum.defold.com/t/weird-tilemap-layering/25329/2 "2018-07-26T04:32:30Z")

</div>

> [@JustAPotota54](#):
>
> Pictures because I don’t know how to display them in the post

Just drop the images in the editing area to upload them. Doing it for you now:

 ![58_PM](https://forum-defold.b-cdn.net/uploads/default/original/2X/e/e08a7b7d4e9f9dfb2d7bfca030379634b0dfd16c.png)

 ![19_PM](https://forum-defold.b-cdn.net/uploads/default/original/2X/3/3102f38d074799c0b59ba6aaa3e648b6313864a8.png)

 ![42_PM](https://forum-defold.b-cdn.net/uploads/default/original/2X/3/3835ab53b041c227bd51a9724cbc74d020febe05.png)

 ![30_PM](https://forum-defold.b-cdn.net/uploads/default/original/2X/4/4139d81081b54d40f23369273205138045b75991.png)

All of them shows how it looks in the editor. Does it look as expected when you run the project?

---

<div class="post-metadata">

**Author:** ![JustAPotota54](https://forum-defold.b-cdn.net/user_avatar/forum.defold.com/justapotota54/32/12344_2.png) [@JustAPotota54](https://forum.defold.com/u/JustAPotota54)\
**Post date:** [July 26, 2018, 3:52pm UTC](https://forum.defold.com/t/weird-tilemap-layering/25329/3 "2018-07-26T15:52:21Z")

</div>

No, but I haven’t messed with the camera yet. I’m using RenderCam by the way.

EDIT: After messing with the camera settings to make it a “perspective” camera, I got this:

 ![25%20AM](https://forum-defold.b-cdn.net/uploads/default/original/2X/4/411090cf776f21c8f20aec2a9754994561acd921.png)

 ![48%20AM](https://forum-defold.b-cdn.net/uploads/default/original/2X/e/e5cf9ce8e667157655f66e4e41b9a671013dc98d.png)

---

<div class="post-metadata">

**Author:** ![JustAPotota54](https://forum-defold.b-cdn.net/user_avatar/forum.defold.com/justapotota54/32/12344_2.png) [@JustAPotota54](https://forum.defold.com/u/JustAPotota54)\
**Post date:** [July 26, 2018, 4:51pm UTC](https://forum.defold.com/t/weird-tilemap-layering/25329/4 "2018-07-26T16:51:41Z")

</div>

After a bit more tinkering, I was able to get the effect I was looking for:

 ![56%20AM](https://forum-defold.b-cdn.net/uploads/default/original/2X/d/d1f8bf024787e7c25678f029d065cb12099c4c39.png)

However, I don’t know how to fix the stretching thing, but it seems like a separate issue for a separate post.

---

<div class="post-metadata">

**Author:** ![Pkeod](https://forum-defold.b-cdn.net/user_avatar/forum.defold.com/pkeod/32/606_2.png) [@Pkeod](https://forum.defold.com/u/Pkeod)\
**Post date:** [July 26, 2018, 5:00pm UTC](https://forum.defold.com/t/weird-tilemap-layering/25329/5 "2018-07-26T17:00:35Z")

</div>

Do you have extrude edges set in your tilesource?

---

<div class="post-metadata">

**Author:** ![JustAPotota54](https://forum-defold.b-cdn.net/user_avatar/forum.defold.com/justapotota54/32/12344_2.png) [@JustAPotota54](https://forum.defold.com/u/JustAPotota54)\
**Post date:** [July 26, 2018, 5:01pm UTC](https://forum.defold.com/t/weird-tilemap-layering/25329/6 "2018-07-26T17:01:25Z")

</div>

No, because I don’t know what that is.

---

<div class="post-metadata">

**Author:** ![britzl](https://forum-defold.b-cdn.net/user_avatar/forum.defold.com/britzl/32/23_2.png) [@britzl](https://forum.defold.com/u/britzl)\
**Post date:** [July 26, 2018, 7:52pm UTC](https://forum.defold.com/t/weird-tilemap-layering/25329/7 "2018-07-26T19:52:30Z")

</div>

> [@Pkeod](#):
>
> Do you have extrude edges set in your tilesource?

> [@JustAPotota54](#):
>
> No, because I don’t know what that is.

It’s this:

 ![04](https://forum-defold.b-cdn.net/uploads/default/original/2X/1/1fbd4ecfcaa311440deedfc6b9723fc878123122.png)

It will get rid of texture bleeding and glitches between tiles. Set to 1 or higher (depending on if you intend to scale the tilemap or not)
