Readd tilemap's shape_transform and bugfixes
This reverts commit a808f53020.
This commit is contained in:
parent
2ee86c773a
commit
4d2642b666
6 changed files with 56 additions and 37 deletions
|
|
@ -461,16 +461,18 @@ void TileMap::_update_dirty_quadrants() {
|
|||
Transform2D xform;
|
||||
xform.set_origin(offset.floor());
|
||||
|
||||
_fix_cell_transform(xform, c, shapes[i].shape_offset + center_ofs, s);
|
||||
_fix_cell_transform(xform, c, center_ofs, s);
|
||||
|
||||
xform *= shapes[i].shape_transform;
|
||||
|
||||
if (debug_canvas_item.is_valid()) {
|
||||
vs->canvas_item_add_set_transform(debug_canvas_item, xform);
|
||||
shape->draw(debug_canvas_item, debug_collision_color);
|
||||
}
|
||||
ps->body_add_shape(q.body, shape->get_rid(), xform);
|
||||
shape_idx++;
|
||||
ps->body_set_shape_as_one_way_collision(q.body, shape_idx, shapes[i].one_way_collision);
|
||||
ps->body_set_shape_metadata(q.body, shape_idx, Vector2(E->key().x, E->key().y));
|
||||
ps->body_set_shape_as_one_way_collision(q.body, shape_idx, shapes[i].one_way_collision);
|
||||
shape_idx++;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue