From 649d307788faa878a47b7d47d7be99c7be1f280e Mon Sep 17 00:00:00 2001 From: birdfreeyahoo Date: Sun, 3 Dec 2017 01:18:05 +0100 Subject: [PATCH] Added Box.Init() before building the selection box While using this code in C++ for selection, I ran into really weird problems, that in some sections of my code the box was not initialized properly and contained really small values by default (especially in debug builds) and behaved weird, due to not calling Box.Init(). --- Source/VictoryBPLibrary/Private/VictoryBPFunctionLibrary.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/Source/VictoryBPLibrary/Private/VictoryBPFunctionLibrary.cpp b/Source/VictoryBPLibrary/Private/VictoryBPFunctionLibrary.cpp index 3b7e09d..a4251a0 100644 --- a/Source/VictoryBPLibrary/Private/VictoryBPFunctionLibrary.cpp +++ b/Source/VictoryBPLibrary/Private/VictoryBPFunctionLibrary.cpp @@ -2221,6 +2221,7 @@ void UVictoryBPFunctionLibrary::Selection_SelectionBox(UObject* WorldContextObje SelectedActors.Empty(); FBox2D Box; + Box.Init(); Box+=DraggedPoint; Box+=AnchorPoint;