Skip to content

Calculate UVs and Normals in ConvexPolygonMeshBuilder#23540

Open
mpowell90 wants to merge 5 commits intobevyengine:mainfrom
mpowell90:fix/extruded-convex-polygon
Open

Calculate UVs and Normals in ConvexPolygonMeshBuilder#23540
mpowell90 wants to merge 5 commits intobevyengine:mainfrom
mpowell90:fix/extruded-convex-polygon

Conversation

@mpowell90
Copy link
Copy Markdown

Objective

Fixes #23526

Solution

  • Added UVs to ConvexPolygonMeshBuilder
  • Whilst testing I noticed that normals were also not generated for the mesh so i've added these as well.

Testing

  • Added test_convex_polygon to bevy_mesh which imitates a different test but for regular polygons.
  • Added Extrusion<ConvexPolygon> to the 3d_shapes example - you can use this example to validate UVs and Normals are working as expected.

@github-actions
Copy link
Copy Markdown
Contributor

Welcome, new contributor!

Please make sure you've read our contributing guide, as well as our policy regarding AI usage, and we look forward to reviewing your pull request shortly ✨

@mpowell90 mpowell90 changed the title Fix/extruded convex polygon Calculated UVs and Normals in ConvexPolygonMeshBuilder Mar 27, 2026
@mpowell90 mpowell90 changed the title Calculated UVs and Normals in ConvexPolygonMeshBuilder Calculate UVs and Normals in ConvexPolygonMeshBuilder Mar 27, 2026
@kfc35 kfc35 added C-Bug An unexpected or incorrect behavior A-Rendering Drawing game state to the screen A-Math Fundamental domain-agnostic mathematical operations S-Needs-Review Needs reviewer attention (from anyone!) to move forward labels Mar 28, 2026
@github-project-automation github-project-automation bot moved this to Needs SME Triage in Rendering Mar 28, 2026
@kfc35 kfc35 added the D-Straightforward Simple bug fixes and API improvements, docs, test and examples label Mar 28, 2026
Copy link
Copy Markdown
Contributor

@kfc35 kfc35 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Logic looks good to me. I checked out the branch and the extrusion looks OK to me too. Thanks for the PR!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-Math Fundamental domain-agnostic mathematical operations A-Rendering Drawing game state to the screen C-Bug An unexpected or incorrect behavior D-Straightforward Simple bug fixes and API improvements, docs, test and examples S-Needs-Review Needs reviewer attention (from anyone!) to move forward

Projects

Status: Needs SME Triage

Development

Successfully merging this pull request may close these issues.

Extrusion<ConvexPolygon> does not generate UVs

2 participants