Giter Site home page Giter Site logo

Extended collision shape support about heron HOT 4 CLOSED

jcornaz avatar jcornaz commented on July 17, 2024
Extended collision shape support

from heron.

Comments (4)

jcornaz avatar jcornaz commented on July 17, 2024

Thanks @faassen for this overview.

Heron doesn't have to mirror rapieri's shapes one-to-one. Where rapiers focuses on physics simulation, heron focuses on games. So only the shapes that are the most useful for gamedev should be added. And I would like to "wait for the need" rather than eagerly adding as many shapes as possible.

I think that if heron has sphere, cuboid, capsule and convex-hull (#59) as well as the ability to create multiple colliders for a single body (#11) then the most important missing building blocks would be:

  • HeightField (#62)
  • Cylinder (#63)
  • Cone (#64)

For the other shapes, I'd rather wait until the need actually arise. Of course any good PR is still welcome.

About the "rounded" variants, I think I would appreciate to have a round: Option<...> field in the shape itself, rather than having another variant. And again, I would wait until the need arise (or until someone opens a PR ^^)

About the shapes that exist only in 2d or 3d: I would probably have these variant behind a #[cfg(feature = ...)] so the variant is available only if the user has activated the appropriate feature. But I might change my mind about that in the future....

from heron.

faassen avatar faassen commented on July 17, 2024

Agreed with your analysis, although I still don't know what a HeightField does in a physics context. :)

from heron.

jcornaz avatar jcornaz commented on July 17, 2024

HeightField does in a physics context

This is usually how (3d) terrain is represented.

from heron.

jcornaz avatar jcornaz commented on July 17, 2024

With all recently added shapes and added support for custom collision shapes (#160), I consider this "epic" done.

More shapes may (and will) still be added. One can create a dedicated issue/pr for shapes that are still missing (and needed)

from heron.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.