Skip to content

Add a cylinder mesh to bevy_render #2282

@allsey87

Description

@allsey87

What problem does this solve or what need does it fill?

Cylinders are a fundamental shape and we should have a means of generating cylinder meshes in Bevy. Currently the closest option to this is a capsule shape.

What solution would you like?

The addition of a Cylinder shape and implementation of From<Cylinder> for Mesh.

What alternative(s) have you considered?

  • Modify the capsule so that the ends could have zero radius?
  • Import a GLTF

Additional context

PR #305 implemented this feature but was closed before merge. I would like to bring this PR back to life and get it merged, however, meshes, normals, UVs etc are not my area of expertise and I am having some problems with the UVs/normals I think (see below). Perhaps I can open a new PR for this? Some more commits will be necessary to get the rendering working.

cylinder

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-RenderingDrawing game state to the screenC-FeatureA new feature, making something new possibleD-TrivialNice and easy! A great choice to get started with Bevy

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions