c# - Farseer Physics Rigid body when restitution =0 -
How can I create a rigid (solid / no bounce) body of physics in the world, I am trying the same with the code below
body body ball = bodyfinter Crete Body (World); CircleShap Circle Shape = New CircleShap (Convert Units. Sim Units (TexturingWidth / 2F), 1f); Stability Stability = Bollywood. Crack Fixtures (CircleShap); BodyBall.BodyType = BodyType Dynamic; BodyBall.Restitution = 0f; Although I set the restore to 0, when it collides with other (similar) bodies, it bounces back.
restoration of conflicts, both Replacement is a function of the value of the property. That function can be customized by modifying the code in Farsiar, especially Settings.cs in phosphichesis. Settings. Modifying the Mistressivation method. Here is the basic implementation, which gives maximum of the two returning values: Public stable float mixistration (float retitude 1, float representation 2) {Return Restitution 1 & gt; ; Restoration 2? Restoration 1: Restoration 2; } So you can modify this method (possibly return the least one instead). Or you can just set the retribution value for the zero of the inserted fixtures.
Comments
Post a Comment