This project is read-only.

How to ignore rebound or Spring force when two physics sprite collide?

Jan 7, 2013 at 2:50 AM

Can you please tell me how to ignore rebound  when two physics sprite collide.

Jan 21, 2013 at 4:43 PM

You would want to look at Collision Categories. I am not sure this code below is 100% correct but maybe it will get you started. You can look at the farseer documentation for more on CollisionCategories.

            foreach (PhysicsSprite spr in cnvGame.PhysicsObjects.Values)
                    foreach (Fixture f in spr.BodyObject.FixtureList)
                        // grapple hook should collide with both bottom and boxes
                        f.CollisionCategories = Category.Cat2;
                        f.CollidesWith = Category.Cat1;

Jan 23, 2013 at 1:31 PM

Thank you for replay Andy.