Collision between NxCharacters

XpLoDWilD

21-12-2009 11:13:01

Hi,

Since NxCharacters aren't officially supported by NxOgre, I used them directly from Ageia SDK. Everything works well, but I can't make NxCharacters collide with each other. interactionFlag is set to Include, setCollison to true, but both hit callbacks are never called when I hit another character.

What am I missing ? I'm fairly new to NxOgre/PhysX btw.

nargil

21-12-2009 14:38:53

you're missing some code to show us =]

Here is what works for me:

class Character : public NxUserControllerHitReport
{
...
NxController* mController;
...
NxControllerAction onShapeHit(const NxControllerShapeHit &hit);
NxControllerAction onControllerHit(const NxControllersHit &hit);
...
};

//... creation
NxCapsuleControllerDesc desc;
desc.interactionFlag = NXIF_INTERACTION_USE_FILTER;
desc.callback = this;
...


NxControllerAction Character::onControllerHit( const NxControllersHit &hit )
{
here is your character collision code
}
NxControllerAction Character::onShapeHit( const NxControllerShapeHit &hit )
{
here is your shape collision code
}


maybe you have NXIF_INTERACTION_EXCLUDE set ?

XpLoDWilD

23-12-2009 12:05:02

I have the same code as you. My interactionFlag was set to INCLUDE as I said. I tried with USE_FILTER, but still no luck, characters walk through each other. Now I'm thinking, could it be because the collision shapes are too small ? I can't use the VisualDebugger so I can't really know how big they are, but could it be a reason or not ?