Character -> Ghost (bullet-native)

Hi there,

at the moment I try to setup some physics(bullet-native). I’m using a Character for controlling my player and want to use a ghost as a trigger for

firing events. But the problem is that the Character gets blocked by the ghost. Only rigidbody’s can pass the ghost. Searching the forum

didn’t show much about that problem. Only this:

There @normen pointed out that the described behaviour is standard for native bullet and is only fixed for the jbullet-version (and still is). Any chance to get this also fixed for the native bullet-version?

I found this in the bullet-forum (I post this without having read it yet):

It doesn’t have much to do with the character actually, more with collision flags. As said, the fix ghost vs character is a simple one, you could basically fish it out of our jbullet repo. I want to finish the implementation without any changes to the bullet engine before though :wink: Later we can have some patch file thats stored in the repo for the changes we make to bullet. If you get to implement this and/or change the collision issues, post back plz ^^

It should be possible yeah ^^ Theres a few issues with the collision callbacks and the ghost objects etc still in native bullet, thats why its not considered stable yet.

Hmm,…where can I find the jBullet-repo? Any hint on where to find your fix would be welcome as well :smiley:

Ah, cool! Ok, actually I made it! It was quite fun, kind of :smiley:

I created a “new” class jme3KinematicCharacterController which is actually the same as the orginal btKinematicCharacterController

with the two changes applied. First I tried to just inherit from bt… but struggeld with that innerClass that also needed to be changed.

This is somehow brute-force but actually lets the original bullet-sourcecode as is and just uses the new class in the wrapper instead…

Feel free to write commit or whatever if that is ok for jme-QA… :smiley:

Here is the patch.

Just apply and use in engine-folder: ant build-bullet-natives

Works at least for linux32


Cool, thanks very much!