Game Development Community

Flipping a t2dTileLayer

by Daniel Roy · in Torque Game Builder · 01/05/2010 (4:20 pm) · 2 replies

I have a tile layer that I want to flip completely. setFlip doesn't seem to work on them. Is there a way I can do this easily without creating a duplicate and copying the tiles over?

About the author

Recent Threads

  • Deleting images

  • #1
    01/05/2010 (7:08 pm)
    setFlip is a method of t2dSceneObject, which is why it doesn't work on a tile layer. For t2dTileLayer there is a method called setTileFlip, but that is to flip each individual tile and not the whole tile layer - where tiles on the right edge of the layer are then on the left edge, etc. Something like that is doable in script, but it could be easier just to make a duplicate layer depending on how many tile layers you are looking to flip.
    #2
    01/06/2010 (3:38 pm)
    Thanks, I did it in code.