In my game I am creating body's (body_1 and body_2)) every X seconds to check the result of that collision. Body_1 is disposed in OnSeparation lik this:
private void TestOnSeparation(Fixture fixtureA, Fixture fixtureB)
string a = fixtureB.Body.UserData as string;
if (a == "destroy") fixtureB.Dispose();
I want to destroy body_2 some time after the collision or if body_2 is sleeping, but new bodys are created before the collision.
Bodys are created like this:
body_1: testcue = BodyFactory.CreateCircle(world, 20f / (2f * MeterInPixels), 1f, cueBallBody.Position);
body_2: testredBody = BodyFactory.CreateCircle(world, 20f / (2f * MeterInPixels), 1f, redBody[ident].Position);
how to dispose Body_2 ?
Thanks in advance,