Add vision cone model scaling for alarm totems

This commit is contained in:
Joshua Thome 2024-10-14 11:26:08 -05:00
parent 0752b11b65
commit b85ec167db
2 changed files with 11 additions and 0 deletions

View File

@ -48,6 +48,12 @@ namespace NewHorizons.Builder.Props.EchoesOfTheEye
alarmTotem._sightAngle = info.sightAngle;
alarmTotem._sightDistance = info.sightDistance;
if (info.stretchVisionCone != null)
{
var visionCone = totemObj.transform.Find("Effects_IP_SIM_AlarmTotem/AlarmTotemVisionCone");
visionCone.localScale = Vector3.Scale(visionCone.localScale, info.stretchVisionCone);
}
return totemObj;
}
}

View File

@ -20,5 +20,10 @@ namespace NewHorizons.External.Modules.Props.EchoesOfTheEye
/// The width of the alarm's "vision cone" in degrees.
/// </summary>
[DefaultValue(60f)] public float sightAngle = 60f;
/// <summary>
/// Scales the visible vision cone in the simulation view (does not affect the actual vision cone detection).
/// </summary>
public MVector3 stretchVisionCone;
}
}