# Tilemap position rendering SOLVED

**URL:** <https://forum.defold.com/t/tilemap-position-rendering-solved/3951>\
**Category:** Bugs\
**Created:** [January 11, 2017, 12:06pm UTC](https://forum.defold.com/t/tilemap-position-rendering-solved/3951 "2017-01-11T12:06:58Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Davej](https://forum-defold.b-cdn.net/user_avatar/forum.defold.com/davej/32/3451_2.png) [@Davej](https://forum.defold.com/u/Davej)\
**Post date:** [January 11, 2017, 12:06pm UTC](https://forum.defold.com/t/tilemap-position-rendering-solved/3951/1 "2017-01-11T12:06:58Z")

</div>

Tilemap renders at origin of tilemap and not co-ords of game object it’s attached to along the x axis only.

 ![](https://forum-defold.b-cdn.net/uploads/default/original/2X/f/fc2710e38559213df786c3b0615a576b0dd7c9b6.png)  
 ![](https://forum-defold.b-cdn.net/uploads/default/original/2X/e/e057315f19a720afb0726d895b44c86fbc7206a6.png)

i can fix this by editing the tilemap source and placing tiles in negative x though.

Also everytime I update the tilemap, in the collection it resets the Z to zero, again easily fixed, just annoying.

---

<div class="post-metadata">

**Author:** ![88.josh](https://forum-defold.b-cdn.net/user_avatar/forum.defold.com/88.josh/32/20137_2.png) [@88.josh](https://forum.defold.com/u/88.josh)\
**Post date:** [January 11, 2017, 12:47pm UTC](https://forum.defold.com/t/tilemap-position-rendering-solved/3951/2 "2017-01-11T12:47:08Z")

</div>

to solve the Z layer problem, I change the sprite’s Z layer and then it didn’t matter that the GO reset to 0 (although I have to say: it was a pain in the arse)

---

<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:** [January 11, 2017, 12:54pm UTC](https://forum.defold.com/t/tilemap-position-rendering-solved/3951/3 "2017-01-11T12:54:06Z")

</div>

> [@Davej](#):
>
> Tilemap renders at origin of tilemap and not co-ords of game object it’s attached

I’m not really sure I understand your problem. If a tilemap is a component of a game object it will inherit the transform of the game object. And you can set an offset on the tilemap component in the properties window to offset it’s position in relation to the game object.

---

<div class="post-metadata">

**Author:** ![Davej](https://forum-defold.b-cdn.net/user_avatar/forum.defold.com/davej/32/3451_2.png) [@Davej](https://forum.defold.com/u/Davej)\
**Post date:** [January 11, 2017, 1:52pm UTC](https://forum.defold.com/t/tilemap-position-rendering-solved/3951/4 "2017-01-11T13:52:08Z")

</div>

Thanks @88.josh for the idea, I put the tilemap itself at 1, fixed my problem, @britzl, I’m still getting my head around Defold, love the engine, but it does have it’s quirks, so if I’m missing something forgive me,

Here’s the position of my tilemap, can clearly see the origin, if it has one that is.

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

Heres the position of my game object

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

Heres the position of the collection

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

Position of collection in Main

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

Position when running game

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

The only way I’ve been able to fix this is to add more tiles to the original tilemap in the negative x.

I’m clearly doing something wrong, but I’ve no idea what. 😟

---

<div class="post-metadata">

**Author:** ![Mathias\_Westerdahl](https://forum-defold.b-cdn.net/user_avatar/forum.defold.com/mathias_westerdahl/32/228_2.png) [@Mathias\_Westerdahl](https://forum.defold.com/u/Mathias_Westerdahl)\
**Post date:** [January 11, 2017, 10:07pm UTC](https://forum.defold.com/t/tilemap-position-rendering-solved/3951/5 "2017-01-11T22:07:01Z")

</div>

Hi @Davej!  
Just as @britzl says, the _tilemap component_ itself has an offset as well. If you open your “paralax\_blackbush.go” file, select the tile component, you can see that it has position/rotation properties you can change. So you have full control to offset it inside the game object.
