/// <summary> /// OnControllerColliderHit is called when the controller hits a /// collider while performing a Move. /// </summary> /// <param name="hit">The ControllerColliderHit data associated with this collision.</param> void OnControllerColliderHit(ControllerColliderHit hit) { TouchableController tc = hit.gameObject.GetComponent <TouchableController>(); if (tc != null) { tc.TouchWithSound(); } }
/// <summary> /// OnCollisionEnter is called when this collider/rigidbody has begun /// touching another rigidbody/collider. /// </summary> /// <param name="other">The Collision data associated with this collision.</param> void OnCollisionEnter(Collision other) { ExpoldeOnCollision(other); TouchableController tc = other.gameObject.GetComponent <TouchableController>(); if (tc != null) { tc.TouchWithSound(); } }