浏览代码

Merge pull request #47382 from akien-mga/3.x-tilemap-collisions-opt-in

TileMap: Make collision visibility opt-in
Rémi Verschelde 4 年之前
父节点
当前提交
7b35fc4549
共有 2 个文件被更改,包括 2 次插入2 次删除
  1. 1 1
      doc/classes/TileMap.xml
  2. 1 1
      scene/2d/tile_map.h

+ 1 - 1
doc/classes/TileMap.xml

@@ -326,7 +326,7 @@
 		<member name="occluder_light_mask" type="int" setter="set_occluder_light_mask" getter="get_occluder_light_mask" default="1">
 		<member name="occluder_light_mask" type="int" setter="set_occluder_light_mask" getter="get_occluder_light_mask" default="1">
 			The light mask assigned to all light occluders in the TileMap. The TileSet's light occluders will cast shadows only from Light2D(s) that have the same light mask(s).
 			The light mask assigned to all light occluders in the TileMap. The TileSet's light occluders will cast shadows only from Light2D(s) that have the same light mask(s).
 		</member>
 		</member>
-		<member name="show_collision" type="bool" setter="set_show_collision" getter="is_show_collision_enabled" default="true">
+		<member name="show_collision" type="bool" setter="set_show_collision" getter="is_show_collision_enabled" default="false">
 			If [code]true[/code], collision shapes are shown in the editor and at run-time. Requires [b]Visible Collision Shapes[/b] to be enabled in the [b]Debug[/b] menu for collision shapes to be visible at run-time.
 			If [code]true[/code], collision shapes are shown in the editor and at run-time. Requires [b]Visible Collision Shapes[/b] to be enabled in the [b]Debug[/b] menu for collision shapes to be visible at run-time.
 		</member>
 		</member>
 		<member name="tile_set" type="TileSet" setter="set_tileset" getter="get_tileset">
 		<member name="tile_set" type="TileSet" setter="set_tileset" getter="get_tileset">

+ 1 - 1
scene/2d/tile_map.h

@@ -80,7 +80,7 @@ private:
 	CollisionObject2D *collision_parent;
 	CollisionObject2D *collision_parent;
 	bool use_kinematic;
 	bool use_kinematic;
 	Navigation2D *navigation;
 	Navigation2D *navigation;
-	bool show_collision = true;
+	bool show_collision = false;
 
 
 	union PosKey {
 	union PosKey {