Created
June 17, 2014 17:55
-
-
Save takashicompany/d41227ad3eed2bf60dbd to your computer and use it in GitHub Desktop.
UnityでLayerMaskをビット演算なしで指定する
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public LayerMask mask; | |
public void IsGrounded() | |
{ | |
if (Physics.Raycast(transform.position, Vector3.down, Mathf.Infinity, mask)) | |
{ | |
Debug.Log("RayがGroundに当たりました"); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment