Fixed Mini Waypoint Being Stuck to Center of Screen When Main Waypoint Spawns Behind Player

This commit is contained in:
Rafal Swierczek 2023-11-27 00:12:45 +00:00
parent 797653132e
commit 53c64e90f4
2 changed files with 4 additions and 4 deletions

Binary file not shown.

View File

@ -20,7 +20,7 @@ void UMiniWaypoint::NativeTick(const FGeometry& MyGeometry, float InDeltaTime)
ArrowImage->SetRenderTransformAngle(TargetYaw - PlayerYaw); ArrowImage->SetRenderTransformAngle(TargetYaw - PlayerYaw);
// Check if waypoint is outside of players vision frustum // Check if waypoint is outside of players vision frustum
if (FMath::IsWithin(ScreenLoc.X, -0.01, 0.01) && FMath::IsWithin(ScreenLoc.Y, -0.01, 0.01)) if (FMath::IsNearlyZero(ScreenLoc.X) && FMath::IsNearlyZero(ScreenLoc.Y) && !FMath::IsNearlyZero(IconCanvasPanelSlot->GetPosition().X))//(FMath::IsWithin(ScreenLoc.X, -0.01, 0.01) && FMath::IsWithin(ScreenLoc.Y, -0.01, 0.01))
{ {
// Check if waypoint is closer to the players right // Check if waypoint is closer to the players right
bool TargetOnTheRight; bool TargetOnTheRight;