천일 외관 적용
This commit is contained in:
@@ -48,15 +48,12 @@ namespace CHN
|
||||
|
||||
LayerMask layerMask = LayerMask.GetMask("Floor Ground", "Floor Wall");
|
||||
|
||||
if (Physics.Raycast(camera.localPosition, camera.forward, out hit, Mathf.Infinity, layerMask))
|
||||
if (Physics.Raycast(camera.position, camera.forward, out hit, Mathf.Infinity, layerMask))
|
||||
{
|
||||
var hitLayer = hit.collider.gameObject.layer;
|
||||
isChangeView = hitLayer.Equals(LayerMask.NameToLayer("Floor Ground"));
|
||||
|
||||
if (isChangeView)
|
||||
{
|
||||
hitFloorIndex = hit.collider.gameObject.GetComponentInParent<Floor>().floorIndex;
|
||||
}
|
||||
Debug.Log(hitLayer);
|
||||
hitFloorIndex = hit.collider.gameObject.GetComponentInParent<Floor>().floorIndex;
|
||||
|
||||
LayerMask wallMask = LayerMask.GetMask("Floor Wall");
|
||||
Collider[] wallOverlapCols = Physics.OverlapSphere(controller.option.target.position, controller.targetColliderRadius, wallMask);
|
||||
|
||||
Reference in New Issue
Block a user