bevy_rapier icon indicating copy to clipboard operation
bevy_rapier copied to clipboard

Support for quad/rect 2D shape in 3D (or degenerate cuboid)?

Open djeedai opened this issue 1 year ago • 1 comments

Hi,

Is it possible to use a degenerate cuboid shape in 3D to simulate a quad/rect 2D shape? That is, setting one half-extent to 0.? By "possible" I mean both whether this works in the first place, and whether this is optimal performance-wise, so handled as a single face instead of a 6-face cube?

Otherwise, what option is there for a quad/rect 2D shape in 3D? I'm surprised this is not supported as built-in given the wide variety of shapes already supported, did I miss something? Should I use a triangle mesh? That feels a bit sub-optimal.

Thanks! :)

djeedai avatar Dec 12 '23 21:12 djeedai

Not sure it's gonna be optimized if you flat a value to 0. But maybe you want something like a "Coumpound shape" https://docs.rs/bevy_rapier3d/latest/bevy_rapier3d/geometry/struct.Collider.html#

ghost avatar Feb 21 '24 10:02 ghost