From 72aa771a83ddfbe4bff60d3ddcfe565a17cb1d95 Mon Sep 17 00:00:00 2001 From: Jens Pitkanen Date: Sat, 8 Aug 2020 08:38:10 +0300 Subject: [PATCH] Fix raycast mask --- Assets/Scripts/Players/Player.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Assets/Scripts/Players/Player.cs b/Assets/Scripts/Players/Player.cs index 447cc8d..447fd60 100644 --- a/Assets/Scripts/Players/Player.cs +++ b/Assets/Scripts/Players/Player.cs @@ -155,7 +155,7 @@ namespace NeonTea.Quakeball.Players { Vector3 From = CameraRoot.position; Vector3 Direction = CameraRoot.forward; - RaycastHit[] Hits = Physics.RaycastAll(From, Direction, BulletHitLayer); + RaycastHit[] Hits = Physics.RaycastAll(From, Direction, 1000f, BulletHitLayer); foreach (RaycastHit Hit in Hits) { Player Player = Hit.rigidbody != null ? Hit.rigidbody.GetComponent() : null; if (Player == this) {