Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- private string CheckInsideBlock(Vector3 targetLocation)
- {
- Ray ray = new Ray(targetLocation + new Vector3(0, 3.1f), Vector3.down);
- RaycastHit rayHit;
- var flag1 = Physics.Raycast(ray, out rayHit, 3.0f, blockLayer);
- var targetEntity = flag1 ? rayHit.GetEntity() : null;
- var inside = targetEntity != null && targetEntity.name.Contains("foundation");
- return inside ? "TPTargetInsideBlock" : null;
- }
Advertisement
Add Comment
Please, Sign In to add comment