From 371eac9beffdfe416b8555ee006baf0ffae2bef3 Mon Sep 17 00:00:00 2001 From: Juan Linietsky Date: Thu, 16 Oct 2014 00:06:34 -0300 Subject: -added custom metadata to physics shapes (2D only for now) -gizmos are not displayed in camera preview --- scene/2d/tile_map.cpp | 3 +++ 1 file changed, 3 insertions(+) (limited to 'scene/2d/tile_map.cpp') diff --git a/scene/2d/tile_map.cpp b/scene/2d/tile_map.cpp index 72ef653d1..eb04ca924 100644 --- a/scene/2d/tile_map.cpp +++ b/scene/2d/tile_map.cpp @@ -179,6 +179,7 @@ void TileMap::_update_dirty_quadrants() { vs->canvas_item_clear(q.canvas_item); ps->body_clear_shapes(q.static_body); + int shape_idx=0; for(int i=0;ibody_add_shape(q.static_body,shape->get_rid(),xform); + ps->body_set_shape_metadata(q.static_body,shape_idx++,Vector2(E->key().x,E->key().y)); + } } } -- cgit v1.2.3-70-g09d2