Keeping track of contacts (what I'm standing on)

Hi everyone,

for my game I need to keep track of everything an actor is standing on.
At the moment I do it in the following way:
I use a contact listener and on BeginContact I add an entry to a set it's a contact "from top".
In EndContact I erase the other object from the list (always, not only if it's from top).

In single player it works fine.
But when doing this over network on clients side there are problems.
Note that I'm not synchronising / serialising the contact set. Instead I rely on the same contacts showing up on both sides.

On client side the positions and velocities of all objects are received multiple times per second. The positions are then set using SetTransform.
I hoped that SetTransform will fire BeginContact and EndContact, if the change in transform causes a new contact or the end of an contact.
But on client side it very often happens, that the set stays empty, although the actor is standing on a wall.

I see some methods to solve it:
- maybe using something else than just SetTransform, so that the contacts are updated
- synchronising the sets (not too good as we don't have too much bandwith to sacrifice)

Does any1 know, why the SetTransform solution is not working, or how I can solve this?
Thanks for help in advance!
I have not tried it myself but I think you can do a world step with time length of zero to get the contacts to update after a SetTransform.

Original thread: https://box2d.org/forum/viewtopic.php?t=8016