trying to fix: camera going through map objects

This commit is contained in:
in0finite 2019-06-23 23:26:32 +02:00
parent 057a0b2c07
commit 0b562318c1

View file

@ -192,7 +192,7 @@ namespace SanAndreasUnity.Behaviours.Peds.States
float distance = cameraDistance;
var castRay = new Ray(castFrom, castDir);
RaycastHit hitInfo;
int ignoreLayer = (1 << MapObject.BreakableLayer) | (1 << Vehicles.Vehicle.Layer) | (1 << Ped.LayerMask);
int ignoreLayer = (1 << MapObject.BreakableLayer) | (1 << Vehicles.Vehicle.Layer) | Ped.LayerMask;
if (Physics.SphereCast(castRay, 0.25f, out hitInfo, distance, ~ ignoreLayer))
{