Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- void GroundCheck()
- {
- RaycastHit hit;
- float distance = 1f;
- Vector3 dir = new Vector3(0, -1);
- if(Physics.Raycast(transform.position, dir, out hit, distance))
- {
- isGrounded = true;
- }
- else
- {
- isGrounded = false;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement