"I was wondering if there is a function that is fast to make sure that the body I have is exist in the world instead of using foreach body in world.BodyList and if statement ...... any faster method"
I don't think there is, but you could always use the 'user data' to point to the world it is in.
"when two bodies are collides how to handle"
You can register for collision events on the body:
this._Body.OnCollision += HandleCollision;
this._Body.OnSeparation += HandleSeparation;
private void HandleSeparation( Fixture fixtureA, Fixture fixtureB )
private bool HandleCollision( Fixture fixtureA, Fixture fixtureB, Contact contact )
// return 'false' to ignore this collision; otherwise, 'true'...
The two fixtures contain the body, and your userdata could contain the world the bodies are in.
"like the car when it move on a flat line the wheel will keep moving for unlimited rounds .... there is no loss force in it !! why !!"
Because you are not simulating air resistance, or other force conversion affects.
Try adding AngularDamping and LinearDamping to the body:
this._Body.AngularDamping = 0.2f;
this._Body.LinearDamping = 0.2f;
I hope this helps!