Collision issue with CharacterController and listener
Posted: Tue Apr 16, 2013 5:01 am
I have extracted the CharacterController from the BEPU demo and have it working in a different program. I have a collision listener on a StaticCollidable, and about 50% of the time when the character comes into contact with the volume it seems to be missing its entity.
I'm using a InitialCollisionDetectedEventHandler<EntityCollidable> to listen for collisions, which has this signiture: public void CollisionHandler( EntityCollidable sender, Collidable other, CollidablePairHandler collisionPair ). In my case 'other' is the character controller's cylinder shape, but when I collide sometimes the Entity is null, and the Tag is null, even though the rest of the data for the cylinder seems to be intact. Other times when I collide the data will be there as it should. Is there something I could be doing that's causing the cylinder (mobilecollidable) to lose its entity and tag?
I'm using a InitialCollisionDetectedEventHandler<EntityCollidable> to listen for collisions, which has this signiture: public void CollisionHandler( EntityCollidable sender, Collidable other, CollidablePairHandler collisionPair ). In my case 'other' is the character controller's cylinder shape, but when I collide sometimes the Entity is null, and the Tag is null, even though the rest of the data for the cylinder seems to be intact. Other times when I collide the data will be there as it should. Is there something I could be doing that's causing the cylinder (mobilecollidable) to lose its entity and tag?