Yes, I don't know how to use the RID
to obtain a PhysicsBody2D
. I have a List<RID>
so I suppose it should be something like:
for (List<RID>::Element *E = rid_list.front(); E; E = E->next()) {
RID body = E->get();
//somehow obtain the body owner here:
NoIdeaOfType body_owner = SomehowObtainOwner(body);
PhysicsBody2D *physics_body = Object::cast_to<PhysicsBody2D>(body_owner);
//do my stuff with physics_body...
}