The Box2d Raycast do have the ability to set the name of the CallBack procedure.
in XUI2D only the World do have the .RayCast member. Means the World_RaycastCallback is getting always the answer to the question.
How do I distinguish between different "sources" in a single callback procedure than? Sure, the source is always the world object, but may it is requested be different procedures with different useage of the answer. like 2 different chatacters at unknown times. Who ask the question answered in the callback some more efficient than setting a special boolean IF THEN structure?
If the boolean structure is the single way how we make sure that the set boolean was really the one wihch ask the world for the RayCast result? I mean this an async process. So we should know/check and not assume the the last answer was the right answer to the last question the world, am I right?
B4X:
void RayCast(b2RayCastCallback* callback, const b2Vec2& point1, const b2Vec2& point2);
in XUI2D only the World do have the .RayCast member. Means the World_RaycastCallback is getting always the answer to the question.
How do I distinguish between different "sources" in a single callback procedure than? Sure, the source is always the world object, but may it is requested be different procedures with different useage of the answer. like 2 different chatacters at unknown times. Who ask the question answered in the callback some more efficient than setting a special boolean IF THEN structure?
If the boolean structure is the single way how we make sure that the set boolean was really the one wihch ask the world for the RayCast result? I mean this an async process. So we should know/check and not assume the the last answer was the right answer to the last question the world, am I right?
Last edited: