Skip to content

Implement draw_shape function to create procedural 2D/3D geometric primitives #15464

Description

@dklassic

Problem or limitation

I've been working on minimalist visual style games and if engines can have (more) built-in 2D/3D geometric primitives rendering function, it would make making the games I've been doing a breeze.

I've came from Unity which also doesn't have this feature and I have been using a plugin that does some of that 2D/3D primitive rendering called Shapes since forever, and this is what my project looked like:

Image

I think it would be pretty neat to have a built-in draw_shape function to procedurally create 2D/3D geometric primitives would be very helpful. I've been recently working to build a plugin in Godot to do just that and I had some success so I figure it shouldn't be that hard to build it into the engine and I would expect a lot of use out of it:

Image

Proposed improvement

Similar to existing _draw() commands, something like void draw_shape(Shape shape, ShapeStyle style, Vector3 position, Quaternion rotation) under _draw(), or a retained mode ShapeHandle draw_shape(Shape shape, ShapeStyle style, Vector3 position, Quaternion rotation) would be nice.

Potentially having a Node that can simply author any shape would also be nice, here's one I built for my plugin:

Image

Proposal review

  • Yes, this proposal is highly specific and actionable.

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions