Page 1 of 1

CompoundCollidable collision detection.

Posted: Wed Jul 24, 2013 6:07 pm
by Peter Prins
Hello Norbo,

I have a question about the CompoundCollidable and collisions. I would like to be able to figure out what child of the CompoundCollidable is involved in each of its Contacts. I was hoping the individual EntityCollidables of its children would have the information in their Pairs, however the lists of pairs of these Collidables are always empty:

Code: Select all

CompoundCollidable.Children[i].CollisionInformation.Pairs;
Sincerely,
Peter

Re: CompoundCollidable collision detection.

Posted: Wed Jul 24, 2013 6:55 pm
by Norbo
Each ContactInformation grabbed from a pair stores a Pair field which refers to the pair which owns that contact. For compound pair contacts, the Pair stored in the ContactInformation refers to the most immediate owner of the contact. Each pair also has a Parent property which, if not null, climbs the hierarchy of pairs one level.

Grabbing the contact's directly owning Pair would provide access to the involved child through the Collidable(A|B) property.
however the lists of pairs of these Collidables are always empty:
This is a bit of an odd limitation that I'd like to deal with. In the current model, it would require the addition a lock in a performance sensitive area. I may be able to eliminate this requirement with a better design, but that's a big job and has been on my to-do list for a while.

Re: CompoundCollidable collision detection.

Posted: Thu Jul 25, 2013 9:42 am
by Peter Prins
Thanks a lot! :D That's a lot easier than I feared when my first aproach didn't work.