Skip to content

Instantly share code, notes, and snippets.

@takashicompany
Created June 17, 2014 17:55
Show Gist options
  • Save takashicompany/d41227ad3eed2bf60dbd to your computer and use it in GitHub Desktop.
Save takashicompany/d41227ad3eed2bf60dbd to your computer and use it in GitHub Desktop.
UnityでLayerMaskをビット演算なしで指定する
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