Native Bullet addConstraint and setCollisionBetweenLinkedBodys

I noticed that I was getting collision between 2 rigid bodies jointed by a hingejoint. While looking at the code, it looks like the extra parameter for setCollisionBetweenLinkedBodys is not being passed into the native c code for the addConstraint method in com_jme3_bullet_PhysicsSpace.cpp.



I think the following line needs to be modified:



[java]

space->getDynamicsWorld()->addConstraint(constraint);

[/java]

to

[java]

space->getDynamicsWorld()->addConstraint(constraint, disableCollisionsBetweenLinkedBodies);

[/java]



and have the setting in PhysicsSpace.java included in the method to invoke the native addConstraint.



I’m not proficient with building native bullet yet. Is it possible to have someone make this change? I know the first response will be “native bullet is not finished yet”, but its being a pain for me right now with what I’m trying to do on Android.



The jBullet implementation looks like it does include the extra parameter.

Thanks, I fixed it and the next build should contain all binaries. Ragdoll test is much nicer now with native bullet ^^

1 Like

Thanks @normen for the fast response.