Merge pull request #92373 from libklein/fix-caching-wrong-collision-layer-shapes
Fix TileSet caching wrong collision layer shapes for shapes comprising several polygons.
This commit is contained in:
commit
93596abcf5
1 changed files with 1 additions and 1 deletions
|
@ -6378,7 +6378,7 @@ Ref<ConvexPolygonShape2D> TileData::get_collision_polygon_shape(int p_layer_id,
|
|||
for (int i = 0; i < size; i++) {
|
||||
Ref<ConvexPolygonShape2D> transformed_polygon;
|
||||
transformed_polygon.instantiate();
|
||||
transformed_polygon->set_points(get_transformed_vertices(shapes_data.shapes[shape_index]->get_points(), p_flip_h, p_flip_v, p_transpose));
|
||||
transformed_polygon->set_points(get_transformed_vertices(shapes_data.shapes[i]->get_points(), p_flip_h, p_flip_v, p_transpose));
|
||||
shapes_data.transformed_shapes[key][i] = transformed_polygon;
|
||||
}
|
||||
return shapes_data.transformed_shapes[key][shape_index];
|
||||
|
|
Loading…
Reference in a new issue