Content-Length: 18373 | pFad | https://docs.unity3d.com/ScriptReference/../Manual/../ScriptReference/Collider-material.html
The material used by the collider.
If material is shared by colliders, it will duplicate the material and assign it to the collider.
using UnityEngine;
public class Example : MonoBehaviour { // Expose properties in the inspector for easy adjustment. float dynFriction; float statFriction;
Collider coll;
void Start() { coll = GetComponent<Collider>();
coll.material.dynamicFriction = dynFriction; coll.material.staticFriction = statFriction; } }
Fetched URL: https://docs.unity3d.com/ScriptReference/../Manual/../ScriptReference/Collider-material.html
Alternative Proxies: