// Set cluster void SetCluster() { cluster = new RFCluster(); // Set shards for main cluster cluster.shards = RFShard.GetShards(rigidList, connectivityType); // Set shard neibs RFShard.SetShardNeibs(cluster.shards, connectivityType); }
/// ///////////////////////////////////////////////////////// /// Collider /// ///////////////////////////////////////////////////////// // Create base cluster with children as shards public static RFCluster SetCluster(Transform transform, ConnectivityType connectivity) { // Create Base cluster RFCluster cluster = new RFCluster(); cluster.tm = transform; cluster.rootParent = null; cluster.depth = 0; cluster.pos = transform.position; // Set cluster id cluster.id = 0; // Set shards for main cluster cluster.shards = RFShard.GetShards(cluster.tm, connectivity); return(cluster); }