From 14e2a991295aaccf68e19088db56e79541e1a8a8 Mon Sep 17 00:00:00 2001 From: Ranoller Date: Mon, 1 Jul 2019 22:43:52 +0200 Subject: Tilemap fix displaced textures and shapes and added center texture and compatibility mode MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This commit fix #22989 #15249 #28206. Main problem is that tilemap displace textures in different tile origins in a strange way and doesn´t respect coincidence between texture and shapes in not uniform tiles. This issue is present in godot 3.0 and godot 3.1. To maintain compatibility are added a compatibility mode and a center texture option. Other related issues and pull request: #28896 #29487 #29519 #29961. Idications of #30204 are added --- doc/classes/TileMap.xml | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'doc') diff --git a/doc/classes/TileMap.xml b/doc/classes/TileMap.xml index 55666b94b5..a0111d3262 100644 --- a/doc/classes/TileMap.xml +++ b/doc/classes/TileMap.xml @@ -274,6 +274,15 @@ If [code]true[/code], the TileMap's children will be drawn in order of their Y coordinate. + + If [code]true[/code], the compatibility with the tilemaps made in Godot 3.1 or earlier is maintained (textures move when the tile origin changes and rotate if the texture size is not homogeneous). This mode presents problems when doing [code]flip_h[/code], [code]flip_v[/code] and [code]transpose[/code] tile operations on non-homogeneous isometric tiles (e.g. 2:1), in which the texture could not coincide with the collision, thus it is not recommended for isometric or non-square tiles. + If [code]false[/code], the textures do not move when doing [code]flip_h[/code], [code]flip_v[/code] operations if no offset is used, nor when changing the tile origin. + The compatibility mode doesn't work with the [member centered_textures] option, because displacing textures with the [member cell_tile_origin] option or in irregular tiles is not relevant when centering those textures. + + + If [code]true[/code], the textures will be centered in the middle of each tile. This is useful for certain isometric or top-down modes when textures are made larger or smaller than the tiles (e.g. to avoid flickering on tile edges). The offset is still applied, but from the center of the tile. If used, [member compatibility_mode] is ignored. + If [code]false[/code], the texture position start in the top-left corner unless [member compatibility_mode] is enabled. + Bounce value for static body collisions (see [code]collision_use_kinematic[/code]). -- cgit v1.2.3