Skip to content
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

CollisionDetectionSystem::createContacts() assert crash #364

Closed
darktemplar216 opened this issue Dec 29, 2023 · 2 comments
Closed

CollisionDetectionSystem::createContacts() assert crash #364

darktemplar216 opened this issue Dec 29, 2023 · 2 comments
Assignees
Labels

Comments

@darktemplar216
Copy link

darktemplar216 commented Dec 29, 2023

in void CollisionDetectionSystem::createContacts() {

by using triggers in the game, I found that the assertion below fails

for (uint32 p=0; p < nbContactPairsToProcess; p++) {
    uint32 contactPairIndex = mWorld->mProcessContactPairsOrderIslands[p];
    ContactPair& contactPair = (*mCurrentContactPairs)[contactPairIndex];
...
    
   assert(potentialManifold.nbPotentialContactPoints > 0);

After I went through the code, I think we are not generating contact points for the triggers. So I add a if() continue to prevents it from happenning.

for (uint32 p=0; p < nbContactPairsToProcess; p++) {
    uint32 contactPairIndex = mWorld->mProcessContactPairsOrderIslands[p];
    ContactPair& contactPair = (*mCurrentContactPairs)[contactPairIndex];
...
    
    if (contactPair.isTrigger)
    {
        continue;
    }

So far seems fine
Does it make any sense? Daniel

@darktemplar216 darktemplar216 changed the title CollisionDetectionSystem::createContacts() assert(potentialManifold.nbPotentialContactPoints > 0); fail CollisionDetectionSystem::createContacts() assert crash Jan 2, 2024
@DanielChappuis
Copy link
Owner

Hello. Thanks a lot for reporting this issue. I take some time to take a look and I think this is already fixed in the "develop" branch. This will be available in the next release of the library.

@DanielChappuis DanielChappuis self-assigned this Feb 28, 2024
@DanielChappuis DanielChappuis added this to the Release v0.10.0 milestone Feb 28, 2024
@DanielChappuis
Copy link
Owner

This is now fixed in version v0.10.0 of the library. Thanks a lot for reporting the issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants