The direction of anisotropy. Anisotropic friction is enabled if the vector is not zero.
DynamicFriction2 and staticFriction2 will be applied along frictionDirection2. The direction of anisotropy is relative to the colliders local coordinate system.
var coll: Collider;
function Start() { coll = GetComponent.<Collider>(); // Make the collider slippery when going forward but not when going sideways. coll.material.frictionDirection2 = Vector3.forward; coll.material.dynamicFriction2 = 0; coll.material.dynamicFriction = 1; }
using UnityEngine; using System.Collections;
public class ExampleClass : MonoBehaviour { public Collider coll; void Start() { coll = GetComponent<Collider>(); coll.material.frictionDirection2 = Vector3.forward; coll.material.dynamicFriction2 = 0; coll.material.dynamicFriction = 1; } }