I created a homing projectile that uses a CircleFixture to keep track of nearby entities. Here is a screen capture from my entity editor. The projectile is defined by the magenta polygon.
The homing effect works fine except when I increase the radius of the CircleFixture it slows down the projectile considerably. For example, it moves at approximately half speed when the radius is twice the size. The fixture has a density of 0 and does not
modify the mass of the body in any way. I have checked to ensure that the mass does not change when the fixture is added. Here's basically what I'm doing in code.
// Creating the body for the projectile
Body body = new Body(world);
List<Vertices> polygons = EarclipDecomposer.ConvexPartition(verts);
FixtureFactory.AttachCompoundPolygon(polygons, density, body); // density is set to 1
// attach sensor CircleFixture
Fixture f = FixtureFactory.AttachCircle(radius, 0, body);
f.IsSensor = true;
f.OnCollision += OnProximitySensorEnter;
f.OnSeparation += OnProximitySensorExit;
// Setting the body to dynamic comes after
projectile.body.BodyType = BodyType.Dynamic;
// apply force in update
I stepped through the creation code and part of the simulation code and couldn't find the cause. Am I doing something wrong or using fixtures incorrectly?