Guest User

Untitled

a guest
Oct 10th, 2018
208
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.49 KB | None | 0 0
  1. private string CheckInsideBlock(Vector3 targetLocation)
  2. {
  3. Ray ray = new Ray(targetLocation + new Vector3(0, 3.1f), Vector3.down);
  4. RaycastHit rayHit;
  5. var flag1 = Physics.Raycast(ray, out rayHit, 3.0f, blockLayer);
  6. var targetEntity = flag1 ? rayHit.GetEntity() : null;
  7. var inside = targetEntity != null && targetEntity.name.Contains("foundation");
  8.  
  9. return inside ? "TPTargetInsideBlock" : null;
  10. }
Advertisement
Add Comment
Please, Sign In to add comment