Fix raycast mask

This commit is contained in:
Jens Pitkänen 2020-08-08 08:38:10 +03:00
parent 75037e5514
commit 72aa771a83

View File

@ -155,7 +155,7 @@ namespace NeonTea.Quakeball.Players {
Vector3 From = CameraRoot.position; Vector3 From = CameraRoot.position;
Vector3 Direction = CameraRoot.forward; Vector3 Direction = CameraRoot.forward;
RaycastHit[] Hits = Physics.RaycastAll(From, Direction, BulletHitLayer); RaycastHit[] Hits = Physics.RaycastAll(From, Direction, 1000f, BulletHitLayer);
foreach (RaycastHit Hit in Hits) { foreach (RaycastHit Hit in Hits) {
Player Player = Hit.rigidbody != null ? Hit.rigidbody.GetComponent<Player>() : null; Player Player = Hit.rigidbody != null ? Hit.rigidbody.GetComponent<Player>() : null;
if (Player == this) { if (Player == this) {