Im trying to make something like destroyable terrain made of small square boxes, then I need to add some extra action when my bodys collides. I have something like this:
public void checkCollisiom()
for (int i = 0; i < this.fix.Count;i++ ) this.fix[i].OnCollision += MyOnCollision;
public bool MyOnCollision(Fixture f1, Fixture f2, FarseerPhysics.Dynamics.Contacts.Contact contact)
if(f2.Body.BodyType == BodyType.Static)
f2.Body.Position = new Vector2(0, 0);
checkCollision is in update.
Its not the best way to achive my goal... i was planning to remove bodys but i dont know how. I think there is a better way to do this, please help!