Question by
Blokka · Jul 07, 2017 at 05:53 PM ·
scripting problemphysicscollidermaterialphysicmaterial
How would I change material properties of a box collider via script?
When I run the following code, it will insert a "(instance)" behind the material in the material field of the box collider component, but doesn't seem to change anything about it: BoxCollider collider = gameObject.GetComponent(); collider.material.dynamicFriction = 0.0f; But there's also no error popping up. What am I doing wrong? I'm in C#, by the way
Comment