Search code examples
c#xnafarseer

Slowing an object in a particular area using Farseer


I'm trying to set an area whereby if an object enters it, it becomes slowed down.

This is what i've got so far:-

        PhysicsBody = BodyFactory.CreateBody(World, new Vector2(x,y));
        PhysicsBody.BodyType = BodyType.Static;

        List<Vertices> vertList = EarclipDecomposer.ConvexPartition(verts);
        Fixtures = FixtureFactory.AttachCompoundPolygon(vertList, density, PhysicsBody);

What setting do I need for the area to cause a slow down to other objects - is it friction?


Solution

  • This post has several solutions for you.

    http://farseerphysics.codeplex.com/discussions/240883

    You could use friction, drag coffecicients, LinearDamping, the VelocityLimietController or to just have two engines and switch between the two.