CameraMovement.ViewingPosCheck C# (CSharp) Method

ViewingPosCheck() public method

public ViewingPosCheck ( Vector3 checkPos ) : void
checkPos Vector3
return void
		void ViewingPosCheck (Vector3 checkPos)
		{
				RaycastHit hit;
				
				Transform pare = null;
				if (Physics.Raycast (checkPos, player.position - checkPos, out hit, relCameraPosMag)) {
						
						
						if (hit.transform != player) {
								GameObject go = null;
								
								List<GameObject> jerarquia = new List<GameObject> ();
								
								if (hit.transform.gameObject.name.Contains ("ID")) {
										pare = hit.transform.parent;
										while (pare.parent != null && !pare.name.Contains("chaflan")) {
												pare = pare.parent;
												
										}
										go = pare.gameObject;
										
								} else {
										go = hit.transform.gameObject;
										pare = go.transform;
										
								}
								
								transparentar (pare.gameObject);
								recorrerArbre (pare);
					
										
								
					
						}
				
				}
			
		}