Search Issue Tracker

Duplicate

Votes

0

Found in

2018.2.0b7

Issue ID

1047324

Regression

No

Default Physics Material is being ignored when accessed though a script

Physics

-

Steps to reproduce:
1. Open the attached project "1047324_repro.zip"
2. Open SampleScene
3. Notice that the default Physics Material "Zero Friction Multiply" has 0 as friction values
4. Notice that the GO "No Material Set" has no material attached
5. Enter Play mode (everything works as expected)
6. Enable "Log Collider Materials" script on the "No Material Set" GO
7. Enter Play mode
8. Notice that the GO does not move and have a new, "Default" physics material attached

Expected result: the script prints out information about the current GO's collider's physics material (in this case, the default physics material)
Actual result: since the default material is only used as the collider's physics material, but not actually assigned as one, the script cannot access the physics material, attached to the collider, therefore it instantiates a new one, that has default values (0.6, 0.6)

Reproducible with: 5.1.5f1, 2017.4.7f1, 2018.1.9f1, 2018.2.0f2, 2018.3.0a6 (3e681eca9b01)

Add comment

Log in to post comment

All about bugs

View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.