The implementation of UKismetArrayLibrary::GenericArray_Shuffle() will generate certain array shuffle results more often (up to three times as much) than others, rather than having a roughly equal changes for possible outcomes.
Ex: The array (1,2,3,4,5) will more often produce the result (2,1,4,5,3) than (5,1,2,3,4)
Suggested fix:
Community reporter mentioned changing
int32 Index = FMath::RandRange(0, LastIndex);
to
int32 Index = FMath::RandRange(i, LastIndex);
in function for loop will provide a more balanced chance of outcome results.
.
Head over to the existing Questions & Answers thread and let us know what's up.
0 |
Component | UE - Gameplay |
---|---|
Affects Versions | 4.16.3, 4.17 |
Target Fix | 4.18 |
Created | Aug 15, 2017 |
---|---|
Resolved | Aug 17, 2017 |
Updated | Apr 27, 2018 |