# Object flipping bug

**URL:** <https://discourse.mapeditor.org/t/object-flipping-bug/1136>\
**Category:** Bugs\
**Created:** [February 22, 2016, 4:46am UTC](https://discourse.mapeditor.org/t/object-flipping-bug/1136 "2016-02-22T04:46:21Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![ophelius](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.mapeditor.org/ophelius/32/3149_2.png) [@ophelius](https://discourse.mapeditor.org/u/ophelius)\
**Post date:** [February 22, 2016, 4:46am UTC](https://discourse.mapeditor.org/t/object-flipping-bug/1136/1 "2016-02-22T04:46:21Z")

</div>

Hi there,  
When I’m setting the horizontal flip on an object, the gid value get’s set to 2147483715. It looks like it’s adding a full signed 32-bit integer somewhere, because the difference is 68, what it should be without the bugged addition. This doesn’t happen to vertically flipped objects. I’ve tried deleting the object and replacing it, but still the same problem. Anyways, thanks.

---

<div class="post-metadata">

**Author:** ![bjorn](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.mapeditor.org/bjorn/32/1599_2.png) [@bjorn](https://discourse.mapeditor.org/u/bjorn)\
**Post date:** [February 22, 2016, 7:46am UTC](https://discourse.mapeditor.org/t/object-flipping-bug/1136/2 "2016-02-22T07:46:15Z")

</div>

That’s because the information about flipping is encoded in the global tile ID using bit flags. See:

[http://doc.mapeditor.org/reference/tmx-map-format/#tile-flipping](http://doc.mapeditor.org/reference/tmx-map-format/#tile-flipping)

Vertically flipped objects work the same way though, just with a different bit. So it’s strange that you didn’t see this there.

---

<div class="post-metadata">

**Author:** ![ophelius](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.mapeditor.org/ophelius/32/3149_2.png) [@ophelius](https://discourse.mapeditor.org/u/ophelius)\
**Post date:** [February 22, 2016, 8:05am UTC](https://discourse.mapeditor.org/t/object-flipping-bug/1136/3 "2016-02-22T08:05:57Z")

</div>

Thank you, I forgot about that map format reference sheet.
