Search Issue Tracker
Won't Fix
Votes
5
Found in
5.5.0f3
Issue ID
870855
Regression
No
Runtime changes to Friction or Bounciness in "Physics material 2d" have no effect on objects which use that PhysicsMaterial2d
To reproduce:
1. Open attached project "Friction.zip".
2. Open and Play "Scene" scene.
3. Observe the scene. "Player" object is sliding at the same speed as if it's Friction is still 0.
4. Stop the scene. Open "ChangeFriction.cs" and uncomment part of the code.
5. Play scene again. Now it works as expected.
Expected result: When you change Friction or Bounciness in "Physics material 2d" at runtime, it has an effect on GameObjects which use this material.
Actual result: If Friction or Bounciness in "Physics material 2d" is changed by the script at runtime, it will have no effect.
Reproducible with: 5.3.7p1, 5.4.3p1, 5.5.0f3, 5.6.0b4
Workaround:
Disable and enable collider2d after you change values in "Physics material 2d".
Notes:
Does not affect new objects which are created after values got changed in "Physics material 2d".
Add comment
All about bugs
View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.
Latest issues
- var VisionOSEDRHeadromm has a comma instead of a dot when building with Metal Rendering App Mode and local OS localization is set to German
- IAP Catalog remove product “x” and add product “+” buttons are not consistent with other remove and add buttons in the Editor
- Performance issues in Play Mode when quickly hovering the mouse cursor over Hierarchy GameObjects
- Frame Debugger displays incorrect output when FidelityFX Super Resolution or Spatial-Temporal Upscaler is used with Temporal Anti-aliasing or Subpixel Morphological Anti-aliasing
- The layout system is failing to correctly calculate or apply the height of the Japanese fallback font when the primary English font's metrics are used
Resolution Note:
Box2D does not support this and implementing it has a low priority. Very old case, not likely to implement it.