GithubHelp home page GithubHelp logo

Comments (5)

mihe avatar mihe commented on July 22, 2024 1

Alright, well, that of course worked like a charm.

I do think this is a little bit strange still, and arguably not the behavior one would expect, but I can see the predicament you mentioned with regards to ContactListener. It's also a fairly specific issue as well I guess, since it pretty much requires using mCollideKinematicVsNonDynamic to begin with.

Anyway, I'll go ahead and close this. Thank you for the help yet again!

from joltphysics.

jrouwe avatar jrouwe commented on July 22, 2024

Hmmm, I think this is actually expected behavior:

image

The definition of 'back facing' is that the center of the box is behind the face. In this top view of snapshot_bad.bin you can see that the center of the box is behind all faces. The reason for this choice is that if you were to treat all of these as contact points then you would get contact normals pointing in all directions and the body would effectively be stuck. MeshShapes are not great sensors as they don't have an inside and an outside, if the shape would have been a CylinderShape or a ConvexHullShape then it would have worked.

As a solution, sensors could perhaps always do a double sided check, but the problem is that you can make an object a sensor in the ContactListener callback, which is after the collision detection has taken place. Also it would be quite a behavioral change. Basically, I don't have a good suggestion.

from joltphysics.

mihe avatar mihe commented on July 22, 2024

As a solution, sensors could perhaps always do a double sided check, but the problem is that you can make an object a sensor in the ContactListener callback, which is after the collision detection has taken place.

I feel bad for even asking this, but could this perhaps be made into a per-body flag instead then? It wouldn't necessarily have to be sensor-specific. Maybe something like AlwaysCollideWithBackFaces?

from joltphysics.

jrouwe avatar jrouwe commented on July 22, 2024

I feel bad for even asking this, but could this perhaps be made into a per-body flag instead then? It wouldn't necessarily have to be sensor-specific. Maybe something like AlwaysCollideWithBackFaces?

Is this not what JoltCustomDoubleSidedShape does?

from joltphysics.

mihe avatar mihe commented on July 22, 2024

Oh right! I could of course just wrap every sensor in that decorator shape. For some reason I thought that wouldn't work on compound shapes, but there's no reason why it wouldn't.

from joltphysics.

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.