Giter Site home page Giter Site logo

Comments (3)

sebcrozet avatar sebcrozet commented on May 19, 2024

Collision margins improve dramatically collision detection times and accuracy by allowing the use of distance computation algorithms to compute penetration depths. Also, by smoothing rough edges, it helps reduce simulation artifacts due to the discrete nature of the geometric models.

The use of margins (and thus a pre-erosion of geometric models) is common on most physics engines I know (Box2D, Bullet) and even proprietary engines that attempt to be more realistic for engineering purposes.

The exact value 0.04 is kind of arbitrary though. It cannot be changed by the user yet but will in the future.

from nphysics.

MovingtoMars avatar MovingtoMars commented on May 19, 2024

Couldn't the margin be automatically deducted off of the shape dimensions, so the output is what's expected?

from nphysics.

sebcrozet avatar sebcrozet commented on May 19, 2024

Not really. This could be done for some specific shapes like boxes and balls (which is what Bullet does), but for other shapes it might lead to unwanted results. For example auto-eroding a triangle mesh might cause self-intersections on thin parts.

from nphysics.

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.