Added fallback arrows in case we cannot build the cone for the ones we build (was happening on Metall: Hellsinger and Road 96).

This commit is contained in:
originalnicodr committed 2024-03-10 19:11:39 -03:00
1 parent 65442023aa
commit 63ac2dfbd9
3 files changed
+55 -25

No files matched your search

+3 -6
View File
@@ -276,12 +276,9 @@ namespace UnityExplorer.UI.Panels
Quaternion arrowRot = lookaheadPoints[i].rotation;
if (followObject != null && FreeCamPanel.followRotationToggle.isOn) arrowRot = followObject.transform.rotation * arrowRot;
try {
// We could expose the color of the arrow to a setting
GameObject arrow = ArrowGenerator.CreateArrow(arrowPos, arrowRot, Color.green);
arrow.transform.SetParent(pathVisualizer.transform, true);
}
catch { ExplorerCore.LogWarning("Couldn't create campath visualizer."); }
// We could expose the color of the arrow to a setting
GameObject arrow = ArrowGenerator.CreateArrow(arrowPos, arrowRot, Color.green);
arrow.transform.SetParent(pathVisualizer.transform, true);
n = 0;
}
}
+3 -6
View File
@@ -158,12 +158,9 @@ namespace UnityExplorer.UI.Panels
switch(requestedType){
case LightType.Spot:
lightComponent.range = 10;
try {
GameObject arrow = ArrowGenerator.CreateArrow(Vector3.zero, Quaternion.identity, lightComponent.color);
arrow.SetActive(false);
arrow.transform.SetParent(obj.transform, true);
}
catch { ExplorerCore.LogWarning("Couldn't create spotlight visualizer."); }
GameObject arrow = ArrowGenerator.CreateArrow(Vector3.zero, Quaternion.identity, lightComponent.color);
arrow.SetActive(false);
arrow.transform.SetParent(obj.transform, true);
break;
case LightType.Point:
GameObject sphere = GameObject.CreatePrimitive(PrimitiveType.Sphere);