mirror of
https://github.com/cocos/cocos4.git
synced 2026-12-01 07:42:38 +08:00
Merge pull request #600 from natural-law/v1.0
Solve the error effect in web when using rotated tile in TiledMap.
This commit is contained in:
@@ -796,7 +796,7 @@ _ccsg.TMXLayer = cc.SpriteBatchNode.extend(/** @lends _ccsg.TMXLayer# */{
|
||||
sprite.setFlippedY(false);
|
||||
|
||||
// Rotation in tiled is achieved using 3 flipped states, flipping across the horizontal, vertical, and diagonal axes of the tiles.
|
||||
if ((gid & cc.TiledMap.TileFlag.DIAGONAL_FLAG) >>> 0) {
|
||||
if ((gid & cc.TiledMap.TileFlag.DIAGONAL) >>> 0) {
|
||||
// put the anchor in the middle for ease of rotation.
|
||||
sprite.anchorX = 0.5;
|
||||
sprite.anchorY = 0.5;
|
||||
|
||||
Reference in New Issue
Block a user