# Rotate collection Problem (SOLVED)

**URL:** <https://forum.defold.com/t/rotate-collection-problem-solved/64157>\
**Category:** Questions\
**Created:** [December 26, 2019, 3:16pm UTC](https://forum.defold.com/t/rotate-collection-problem-solved/64157 "2019-12-26T15:16:33Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![d954mas](https://forum-defold.b-cdn.net/user_avatar/forum.defold.com/d954mas/32/5401_2.png) [@d954mas](https://forum.defold.com/u/d954mas)\
**Post date:** [December 26, 2019, 3:16pm UTC](https://forum.defold.com/t/rotate-collection-problem-solved/64157/1 "2019-12-26T15:16:33Z")

</div>

1)I make a complex object as collection file.  
It is a letter with info.(Bg,letter, and letter cost)  
2)I am trying to rotate it.  
3)When i rotate it sprite z ordering in changed.

How can i rotate such collection?

 ![1](https://forum-defold-uploads.b-cdn.net/original/3X/d/3/d3d91ce8edbb23cfadd7857127abf0217ab5c6ec.png)  
 ![2](https://forum-defold-uploads.b-cdn.net/original/3X/a/5/a58eec26084fa69d0ac87eb454ba3cb027cebe9e.png)  
 ![3](https://forum-defold-uploads.b-cdn.net/original/3X/9/e/9ec7d74e9bf27e2a52fd5b7ee07a170bbe04b93f.png)

---

<div class="post-metadata">

**Author:** ![lrx](https://forum-defold.b-cdn.net/user_avatar/forum.defold.com/lrx/32/18081_2.png) [@lrx](https://forum.defold.com/u/lrx)\
**Post date:** [December 26, 2019, 4:38pm UTC](https://forum.defold.com/t/rotate-collection-problem-solved/64157/2 "2019-12-26T16:38:38Z")

</div>

Hi d954mas,

If the background the letter and the cost are on same Z maybe is an math approx issue.

Try moving background a little far (0.1) or the letter and cost a little near.

Maybe will work 🙂

---

<div class="post-metadata">

**Author:** ![d954mas](https://forum-defold.b-cdn.net/user_avatar/forum.defold.com/d954mas/32/5401_2.png) [@d954mas](https://forum.defold.com/u/d954mas)\
**Post date:** [December 26, 2019, 4:42pm UTC](https://forum.defold.com/t/rotate-collection-problem-solved/64157/3 "2019-12-26T16:42:27Z")

</div>

No. It have a big z differences. Looks like it depends on go position. If i move letter cost to (0,0,z) it will work.

---

<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:** [December 26, 2019, 6:12pm UTC](https://forum.defold.com/t/rotate-collection-problem-solved/64157/4 "2019-12-26T18:12:03Z")

</div>

Is your camera orthographic? Try switching to a perspective camera like with rendercam?

I remember facing this problem in the past but I don’t remember the solution. 😕

Is depth test enabled in your render script?

> [@The label component blink when rotation GO over Y axes (SOLVED)](https://forum.defold.com/t/the-label-component-blink-when-rotation-go-over-y-axes-solved/9311/4):
>
> I think it has to do with the sorting inside the engine in combination that you probably don’t have depth test enabled in your render script. I put together a super quick example, I’ll attach the project as a zip. Let me know if you have any questions! Project: [card3d.zip](https://defold-forum-bucket.nbg1.your-objectstorage.com/original/2X/6/6fbb0bcf148ad360ee8d1662aaf15e31cff09648.zip) (35.8 KB)

---

<div class="post-metadata">

**Author:** ![sergey.lerg](https://forum-defold.b-cdn.net/user_avatar/forum.defold.com/sergey.lerg/32/3970_2.png) [@sergey.lerg](https://forum.defold.com/u/sergey.lerg)\
**Post date:** [December 26, 2019, 6:15pm UTC](https://forum.defold.com/t/rotate-collection-problem-solved/64157/5 "2019-12-26T18:15:27Z")

</div>

Do you use scale\_along\_z = true in the collection?

---

<div class="post-metadata">

**Author:** ![d954mas](https://forum-defold.b-cdn.net/user_avatar/forum.defold.com/d954mas/32/5401_2.png) [@d954mas](https://forum.defold.com/u/d954mas)\
**Post date:** [December 26, 2019, 6:23pm UTC](https://forum.defold.com/t/rotate-collection-problem-solved/64157/6 "2019-12-26T18:23:14Z")

</div>

It is perspective. In orthographic same problems.

---

<div class="post-metadata">

**Author:** ![d954mas](https://forum-defold.b-cdn.net/user_avatar/forum.defold.com/d954mas/32/5401_2.png) [@d954mas](https://forum.defold.com/u/d954mas)\
**Post date:** [December 26, 2019, 6:23pm UTC](https://forum.defold.com/t/rotate-collection-problem-solved/64157/7 "2019-12-26T18:23:43Z")

</div>

No. I will try

---

<div class="post-metadata">

**Author:** ![d954mas](https://forum-defold.b-cdn.net/user_avatar/forum.defold.com/d954mas/32/5401_2.png) [@d954mas](https://forum.defold.com/u/d954mas)\
**Post date:** [December 26, 2019, 6:25pm UTC](https://forum.defold.com/t/rotate-collection-problem-solved/64157/8 "2019-12-26T18:25:08Z")

</div>

Hmm. Not sure that I enable depth test)) I will try

---

<div class="post-metadata">

**Author:** ![d954mas](https://forum-defold.b-cdn.net/user_avatar/forum.defold.com/d954mas/32/5401_2.png) [@d954mas](https://forum.defold.com/u/d954mas)\
**Post date:** [December 26, 2019, 10:00pm UTC](https://forum.defold.com/t/rotate-collection-problem-solved/64157/9 "2019-12-26T22:00:01Z")

</div>

Thanks. Enabling depth test and using diffirent pridicates helped.
