IsBullet

Topics: Developer Forum, User Forum
May 28, 2013 at 11:20 PM
Hello all.
I use Farseer engine for some time. I like it :). But now I stuck with bullet collision detection. I create bullet Body this way:
BaseBody = BodyFactory.CreateCircle (_World, Global.ToMeters (_Width / 2), 1, Global.ToMeters (_Position));
Then I set bullet body properties:
BaseBody.BodyType = BodyType.Dynamic;
BaseBody.IsSensor = true;
BaseBody.OnCollision + = new OnCollisionEventHandler (Bullet_OnCollision);
BaseBody.IsBullet = true;
BaseBody.ApplyLinearImpulse (_AimVector * Force);
Nevertheless, sometime there is NO collision with another Body that is in the way (not reached event Bullet_OnCollision). Bullet goes through and continues behind obstacle with no collision detection (tunneling?).
Are there some instructions on how to properly use the parameter IsBullet or set other parameters of the World?

The second question is, how I can find precise location of collision? Now when collision is detected, the bullet is usually shortly in front of or bit behind obstacle. So I can't use bullet position as precise location of collision.

Thank you very much for help.
Regards,
Michal Dvořák.