[bloody mess]CharacterController falls through SceneGeometry

CrazyLegz

18-05-2009 23:35:35

Hi All,

I am using Bloody Mess 1.5.4.

I have written my own CharacterController implementation using Physx's character control system.
All is good and it collides with other objects, except for planes (which is explained in the link below) and SceneGeometries.
They simply just don't fire the onShapeHit callback in my NxUserControllerHitReport.

This explains the plane.
http://developer.nvidia.com/forums/inde ... 9&hl=plane

Is there some flag I missed for the SceneGeometries or is it just the same principle as with the plane, they just don't get detected in the sweeps (geez).

I guess I could just use the OGRE3DRenderSystem::createBody function instead of the NxOgreScene::createSceneGeometry.
But how would I keep the ground from being affected by gravity (it falls down)?

Thanks in advance!

betajaen

18-05-2009 23:45:15

Interesting. It isn't the StaticGeometry or the TriangleMeshShape/Terrain shapes either being in the right class.

It's more related to the sweeping code, or the use of it. I'm nearly sure the sweeping code does detect static shapes, and does do things about it. Else the character controller would never work on static shapes - which I know is false. Without looking at your code, I can't help much. But you can have a look at the "KinematicController" class in BloodyMess. Which is my implementation of the CharacterController - based of the source provided by Ageia.

One important thing to ask; Your sweep code looks something like this?

unsigned int nbHits = mScene->getScene()->linearOBBSweep(sweep_box, sweep_direction, NX_SF_STATICS | NX_SF_DYNAMICS, NULL, 1, &result, NULL);

Note the "NX_SF_STATICS | NX_SF_DYNAMICS" flags.

CrazyLegz

19-05-2009 19:04:03

Hi betajean, thank you for your replying.
It was a little mistake I made in my call to the controllers move function, I overlooked it completely...
The mask I provided to the collisionGroups parameter of the function was a little messed up. :oops:
Thanks, and keep up the good work with NxOgre!

betajaen

19-05-2009 19:19:53

I thought it was something simple. :)