Bug: Rotation of tile added to Object Layer is being ignored

I’ve just noted you can add an a tile to the Object Layer, and then go mte.drawObjects(), which works great.  You can move the tile around and this works.

When I rotate the tile in Tiled however MTE is not picking up this rotation.

I have experienced this as well. I am currently using the object layer to layout objects that I replace with sprites in an addObjectDrawListener.  This way I can use Tiled to position my objects and remove and replace them with sprites which I build to contain my animation sequences, physics shapes, and other properties that I need at runtime. 

For now I slightly modified MTE to pass along the rotation property from the Tiled map to the object. It is however a little more complex then just applying the rotation due to the fact that tiled rotates objects according to a bottom left axis. So for the time being I have to change the offsetX and offsetY properties which in turn alter the anchorX and anchorY in MTE, then apply the rotation and move the object back to its intended location which is now half the object width and height away.

I would love for this to just work out of MTE so the rotation and position of the original Tiled object would correlate on the loaded map. Furthermore it would be nice if the Tiled object properties would carry over to the object so I could access them from the addObjectDrawListener as well.

 

Good thoughts all around. I’ll modify MTE to obey Tiled’s object rotation.

I have experienced this as well. I am currently using the object layer to layout objects that I replace with sprites in an addObjectDrawListener.  This way I can use Tiled to position my objects and remove and replace them with sprites which I build to contain my animation sequences, physics shapes, and other properties that I need at runtime. 

For now I slightly modified MTE to pass along the rotation property from the Tiled map to the object. It is however a little more complex then just applying the rotation due to the fact that tiled rotates objects according to a bottom left axis. So for the time being I have to change the offsetX and offsetY properties which in turn alter the anchorX and anchorY in MTE, then apply the rotation and move the object back to its intended location which is now half the object width and height away.

I would love for this to just work out of MTE so the rotation and position of the original Tiled object would correlate on the loaded map. Furthermore it would be nice if the Tiled object properties would carry over to the object so I could access them from the addObjectDrawListener as well.

 

Good thoughts all around. I’ll modify MTE to obey Tiled’s object rotation.