Replies: 3 comments 1 reply
|
Hello, Thanks for the suggestion. I read the Box3D documentation and I see how it could optimize certain interactions. In my experience, enabling CCD for bodies comes at a fairly low simulation cost. It only does something when the body moves over a certain speed (the speed at which it could tunnel through an object) and it only does 1 additional collision check during the simulation. The density of static objects is usually much higher than that of dynamic objects, so I'm not sure how much skipping dynamic objects will actually save. Do you have an actual use case for this where CCD is a performance issue? For characters: If you use |
|
Thanks for responding. About performance. For my game I use custom character implementation that is basically levitating rigid body. In situation where there are many NPCs attacking one target - tight NPC positioning in combination with CCD causes noticeable performance difference. Especially on platforms like emscripten. It's not critical, but it scales badly with number of NPCs. There is also side effect of NPCs having CCD. They are noticeably less effective in pushing each other. While from physics perspective it's more correct behaviour, since they are pushing each other by slightly clipping into each other, them pushing each other is nice side effect to use. About static geometry and clipping. In my engine world geometry is made of few mesh shapes. Because triangles don't have any thickness - it's not very hard for geometry to clip through it. I think situations like this could be main reason for selective CCD. |
|
Adding this would not be very hard. See this for a possible way to implement it. By checking An alternative way could be to add an additional At the moment I don't know if the added complexity is worth it. Especially since I may change the way the solver / CCD works in the future in a way that no longer clearly separates these two stages. |
Uh oh!
There was an error while loading. Please reload this page.
Hi
I've been looking into Box3D documentation and found one interesting feature. In Box3D it's called bullets. Core idea is that some dynamic objects should never clip through static geometry, but they don't need CCD due to their large amount or them being tightly placed.
I think this idea could be very useful, but with slight changes. Some kind of optional CCD filter would work nice. So, for example, characters could have CCD against world geometry and doors but won't have against physics props or other characters.
All reactions