Turning off character collision

Pottej

22-06-2007 14:23:27

Hi,

In my game I'm trying to make the character do something where I want total control over his movement, therefore I dont want PhysX moving him due to collisions. I am unsure as to how to turn off the collisions, I know you can disable the collisions on the kinematic actor through the NxController, but that wont stop the character from colliding with the world.

I've tried writing in my own setters for the active group mask variables, but changing them doesn't seem to be making a difference. I wondered if anyone knew how to do it? From the Ageia docs it seems I want to be changing the 'activeGroups' parameter or the 'groupsMask'. If all my actors are in group 0, how do I make it so my character doesnt collide with them?

Here's what I've tried at the moment, none work:


getCharacter()->setActiveGroup(1); // disable collisions test
getCharacter()->getNxController()->setCollision(false);
getCharacter()->getNxController()->getActor()->setGroup(1);


Cheers,

Pottej

betajaen

22-06-2007 14:39:56

I don't believe PhysX moves the character as a collisions response before. The character's NxActor is kinematic, so any response of a collision with another NxActor is ignored on the Character part.

If you use a CharacterHitReport, and make sure you return the value RS_PassThrough. You'll have total control of the collision responses within your class, but again I haven't seen the Character move like that before. So your job may be a little unneeded.

Pottej

22-06-2007 14:44:29

Yeah I am using a character hit report to get dynamic actors to respond properly, but my problem comes because i cant stop the character controller being prevented from colliding with walls and other things.

I am trying to make my character climb a slope, but i have alignment problems because he keeps being push away due to the capsule's height.

I am experimenting with group masks at the moment, i'll tell you how i get on. If I am making this way too complicated, please tell me :)