Comments (5)
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.
Hmmm, I think this is actually expected behavior:
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.
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.
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.
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)
- Annoying identical color HOT 2
- Assert hit on a scene without constraints w/ `JPH::TempAllocatorMalloc`. HOT 1
- [Question] How do I create a custom mesh from a list/array of vertices? HOT 1
- Unresolved external error when adding HelloWorld code to project HOT 3
- No CMAKE_CXX_COMPILER could be found on MacOS HOT 3
- MeshShape mMaxTrianglesPerLeaf assert HOT 1
- HingeConstraint does not behave as expected HOT 2
- -mfpmath=sse is not added in 32bits build HOT 10
- Sample CharacterTest.cpp HOT 1
- LinearCast Body missed in Sensor contact HOT 4
- NonCopyable is missing move operations HOT 3
- Crash on Mutex::lock() - 0x00007ffbd9232ff0 MSVCP140.dll!UnknownFunction HOT 2
- Spheres collide with internal edges despite mitigations HOT 6
- Compilation fails with g++ on Ubuntu 22.04 HOT 5
- Missing documentation on how to destroy a physics object. HOT 2
- `-mfpmath=sse` is not supported by Emscripten HOT 5
- Request for official vcpkg support HOT 2
- Serialized arrays are not compatible between 32 vs 64 HOT 1
- VS2022_CL build fails with warning C4514
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from joltphysics.