Fixing CollisionPolygon3D debug shape rendering.
When a CollisionPolygon3D is drawn with a concave area, it fails to render the surface of the top and bottom. Steps to reproduce the bug in the editor: 1. Create a new scene 2. Create CollisionPolygon3D 3. Make sure debug fill is checked in the CollisionPolygon3D inspector. 4. Add these vertices to the the polygon (0,0), (1,-1), (1,1), (-1, 1), (-1, 0.3). You should see that only one triangle from the top and bottom of the polygon is drawn and the reset are missing.
This commit is contained in:
parent
08705259f2
commit
4fe40ac07e
1 changed files with 2 additions and 2 deletions
|
|
@ -168,7 +168,7 @@ void CollisionPolygon3DGizmoPlugin::redraw(EditorNode3DGizmo *p_gizmo) {
|
|||
Vector<Color> cap_colours_bottom;
|
||||
Vector<int> cap_indices_bottom;
|
||||
|
||||
const int index_offset = verts_size;
|
||||
const int index_offset = verts.size();
|
||||
|
||||
const Vector<Vector2> &convex = decomp[i];
|
||||
const int convex_size = convex.size();
|
||||
|
|
@ -198,7 +198,7 @@ void CollisionPolygon3DGizmoPlugin::redraw(EditorNode3DGizmo *p_gizmo) {
|
|||
Vector<Color> cap_colours_top;
|
||||
Vector<int> cap_indices_top;
|
||||
|
||||
const int index_offset = verts_size;
|
||||
const int index_offset = verts.size();
|
||||
|
||||
const Vector<Vector2> &convex = decomp[i];
|
||||
const int convex_size = convex.size();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue