Advertisement
Guest User

Untitled

a guest
Mar 23rd, 2015
119
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. float howeverFarTheFloorShouldBe = 5f;
  2.         var hits = Physics.RaycastAll(PlayerGameObject.transform.position, Vector3.down, howeverFarTheFloorShouldBe);
  3.         foreach (var hit in hits)
  4.         {
  5.             if (hit.collider.gameObject != PlayerGameObject && hit.collider.CompareTag("FloorTag"))
  6.             {
  7.                 //then do jump stuff
  8.             }
  9.         }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement