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

Jan 7, 2013 at 1:50 AM

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

Coordinator
Jan 21, 2013 at 3: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. http://farseerphysics.codeplex.com

            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 12:31 PM

Thank you for replay Andy.