Created
December 3, 2015 04:00
-
-
Save sylistine/1df4b0ef8153f0d8fc63 to your computer and use it in GitHub Desktop.
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
float rayDist = 0.1; | |
RaycastHit hitA, hitB; | |
hitA = Physics.Raycast( | |
transform.position + transform.up * rayDist * 2, | |
transform.forward, | |
Mathf.Infinity, | |
layerMask | |
); | |
hitB = Physics.RaycastAll( | |
transform.position + transform.right * rayDist + transform.up * rayDist, | |
transform.forward, | |
Mathf.Infinity, | |
layerMask | |
); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment