Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- bool ground()
- {
- float extraheight = .01f;
- RaycastHit2D hit = Physics2D.Raycast(boxcollider2d.bounds.center, Vector2.down, boxcollider2d.bounds.extents.y + extraheight);
- if (hit.collider != null)
- return true;
- else
- return false;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement