mirror of
https://github.com/GTA-ASM/SanAndreasUnity
synced 2024-11-26 22:10:17 +00:00
trying to fix: camera going through map objects
This commit is contained in:
parent
057a0b2c07
commit
0b562318c1
1 changed files with 1 additions and 1 deletions
|
@ -192,7 +192,7 @@ namespace SanAndreasUnity.Behaviours.Peds.States
|
||||||
float distance = cameraDistance;
|
float distance = cameraDistance;
|
||||||
var castRay = new Ray(castFrom, castDir);
|
var castRay = new Ray(castFrom, castDir);
|
||||||
RaycastHit hitInfo;
|
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))
|
if (Physics.SphereCast(castRay, 0.25f, out hitInfo, distance, ~ ignoreLayer))
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue