El material usado por el collider.
El material usado por el collider. it will duplicate the material and assign it to the collider.
// Expose properties in the inspector for easy adjustment. var dynFriction: float; var statFriction: float;
var coll: Collider;
function Start() { coll = GetComponent.<Collider>(); coll.material.dynamicFriction = dynFriction; coll.material.staticFriction = statFriction; }
using UnityEngine; using System.Collections;
public class ExampleClass : MonoBehaviour { public float dynFriction; public float statFriction; public Collider coll; void Start() { coll = GetComponent<Collider>(); coll.material.dynamicFriction = dynFriction; coll.material.staticFriction = statFriction; } }