-
-
Notifications
You must be signed in to change notification settings - Fork 225
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Objects fall through ConcaveMeshShape #51
Comments
When you create the TriangleVertexArray for your concave mesh, are you using the constructor to specify your surface normals or are you letting ReactPhysics3D compute the normals ? |
Hi, I am not passing triangle/surface normals. I also see ConvexMeshes falling through BoxShapes. Its not super urgent. I will review my ConvexMeshShape generation again. And I will make a video to demonstrate the issues soon. Best regards |
ConvexMesh and BoxShape use the same algorithm to collide against a ConcaveMeshShape. Therefore, it makes sense that you observe issues with both objects if something is wrong. Are you able to produce a simple piece of code with a very simple ConcaveMeshShape and a BoxShape falling througth it ? It would be very helpful for debugging. |
Ill do. Give me 1, max 2 days. |
Great. Thanks a lot for your help ! |
I need some more time but will provide a test soon. |
Hi, I have created a test that shows the issue. I am not sure if this covers all issues I have seen. But its a issue still. Hope you do not mind that its written in TDME2. You can build with "make clean && make -jHARDWARETHREADS mains" See: Please keep me updated! Best regards |
Hello, After investigation, I think that in your example this is due to the fact that ReactPhysics3D uses discrete collision detection. What we observe is tunneling of shapes inside each other. In a given frame t the box is above the terrain and in the next frame t+1 the box is already bellow the terrain but there was no frame where the box was colliding with the terrain and therefore the collision has been missed. I have plan to add continuous collision detection in the future but probably not in the next release. The idea is to compute when the two shapes will collide so that we don't miss the collision. What you might try is to make sure that the collision shapes are not too small and also that their velocities when they collide to each other are not too large so that we do not miss the collision. |
Hi,
If its just that we will find a work around! I will check that. Thank you. Best regards |
But no. To be honest I do not think so. In my physics tests 1-3 you can see the issue as well with larger objects and moving more slowly. Maybe I can provide a test with bigger bounding volumes? I will double check. |
Ok I will check your physics test 1-3 |
Just move the boxes or convex meshes in PhysicsTest1+3. The issue I mean happens from time to time. Many thanx. Best regards |
Can I ask you some questions about your physics tests in the "reactphysics3d-current" branch ? When I run the PhysicsTest1, almost immediately, all the objects disappear. Are all the objects are falling through the ground ? In the PhysicsTest2, I see boxes falling through boxes. Do you also have this behavior on your side ? In the PhysicsTest3. Do you know why the objects have very strange behavior ? I mean jumping around everywhere ? |
Hi, here everything is working 100%. I only have the issue that I show in PhysicsTest4. Best regards |
I am on FreeBSD and MacOSX and sometimes I check Windows build too. |
Hi, see here: Best regards |
On my side, I have this on Linux Mint (sorry for the flickering of the video): https://www.dropbox.com/s/zskxy543hra44h6/tdme2-tests.mp4?dl=0 That's really strange. |
Hi, I will check linux later. Do not use it that often. I guess you are in virtualization? And Mint uses GCC right? MacOSX has Clang as well as FBSD. So there might be a GCC issue. Best regards |
But your frame times indicate that you build via -g (debug build) |
Hi, Ok. Ive just tried TDME2-RP3D on my Ubuntu installation. I had have similar issues like you did. I read somewhere in your documentation that you use -O2 instead of -O3 I tried this and it seems to fix the issues. The issue with PhysicsTest4 remains. Please tell me if this fixes your issues on your Linux Mint installation. I will commit -O2 for now. Best regards |
Ok thanks it's much better now with the -O2 option. I will continue investigating the issue. |
I have been able to reproduce the issue in my testbed. I will now try to fix it. |
This is great news!!! Cant await the fix! |
Hi, do not want to rush or something. I am just curious. Any news here? Best regards |
Hello, Yes, it took me some time but I think I have found a way to fix the issue yesterday. I will try to commit this fix this week-end after some more testing. |
If you provide me the fix as a patch or something I can help to test too. |
I have pushed a fix with this commit into the "develop" branch. On my side, it fixes the BoxShape and ConvexMeshShape falling through ConcaveMeshShape and HeightFieldShape. It also fixes some jittering betweeen those shapes. Could you test on your side if it is better now ? |
Hi, very nice. Will test tomorrow. Thanx a lot. I am super curious! |
PhysicsTest4 is fixed! And I am not able anymore to push convex meshes out of screen on PhysicsTest1 or 3! Seems like you fixed this bug!!! The only thing that I see is that in my PhysicsTest4 the box has a small rotation around X or Z axis when idling on ground after beeing throwed, where as it maybe should not. Not a blocker. Not a big issue. I will test much more the next days using our game! |
Thanks a lot for your test and feedback. I have merged the fix into the "master" branch and I am closing this issue. About this small rotation, we will have to open another issue if necessary. Thanks again for reporting the bug. |
HI,
sometimes in like 2/8 cases objects fall through ConcaveMeshShape.
In my case the bounding volumes are just BoxShapes.
I have an example video where you can see the issue:
I can provide another video if interested.
Many thanx and
Best regards
Andreas
The text was updated successfully, but these errors were encountered: