using System.Collections; using System.Collections.Generic; using System.Linq; using UnityEngine; namespace BNG { public class RagdollHelper : MonoBehaviour { Transform player; List colliders; Collider playerCol; // Start is called before the first frame update void Start() { player = GameObject.FindGameObjectWithTag("Player").transform; playerCol = player.GetComponentInChildren(); colliders = GetComponentsInChildren().ToList(); foreach(var col in colliders) { Physics.IgnoreCollision(col, playerCol, true); } } } }