Games Identifying a B2Body without the body wrapper

Andrew Gray

Member
Licensed User
Longtime User
Apologies if this is a silly question, but when iterating through bodies in a game using World.AllBodies or World.DynamicBodies, is there a way of actually identifying what each body is, i.e. getting the name or ID? (I'd prefer not to rely on the Tag property since this might have been put to other uses.)

The problem is that these functions return a list of Bodies, not BodyWrappers, which leaves Name, ID and certain other useful properties inaccessible.

Is there a way of finding a corresponding BodyWrapper from a Body?
 
Top