Closed thegrb93 closed 3 years ago
Setters are no longer needed. See #659
For your case do this (it seems udata
is an integral value):
body->GetUserData().pointer = udata;
Allright, thanks.
Looks like for other types, I could do body->GetUserData() = udata
as well.
@erincatto there's still a signature for SetUserData in b2Body you might want to get rid of.
This doesn't seem to work anymore? are there any examples of b2_user_settings that shows how to add custom userdata?
For the time being i have modified the b2settings.h and changed all the pointers to void* but any update would mean that would need to be changed again.
They don't work with void though which breaks compatibility. The only solution I could think of was `body->SetUserData((b2BodyUserData)(&udata))
Might just
#define` the userdatas for my project void