You've already forked UnrealEngineUWP
mirror of
https://github.com/izzy2lost/UnrealEngineUWP.git
synced 2026-03-26 18:15:20 -07:00
Chaos AABBTree dirty grid, Raycasts and Sweeps are now done in local coordinates to improve precision in very large worlds
#rb Cedric.Caillaud [FYI] Benn.Gallagher, Chris.Caulfield #jira none [at]Cedric.Caillaud #preflight 60f800be391d4600017da922 #ROBOMERGE-SOURCE: CL 16908144 in //UE5/Main/... #ROBOMERGE-BOT: STARSHIP (Main -> Release-Engine-Test) (v836-16769935) [CL 16908151 by jaco vandyk in ue5-release-engine-test branch]
This commit is contained in:
@@ -615,14 +615,15 @@ namespace ChaosTest
|
||||
{
|
||||
FAABBTreeDirtyGridCVars::DirtyElementMaxCellCapacity = 7;
|
||||
TUniquePtr<TBox<FReal, 3>> Box;
|
||||
auto Boxes = BuildBoxes(Box, 100, FVec3(40, 40, 1), FVec3(-2000, -2000, -50));
|
||||
FVec3 LargeOffset(10000000, 10000000, 10000000); // Test for floating point precision errors at large world offsets
|
||||
auto Boxes = BuildBoxes(Box, 100, FVec3(40, 40, 1), FVec3(-2000, -2000, -50) + LargeOffset);
|
||||
|
||||
for (float Angle = 0.0; Angle < 2 * PI; Angle += (10.0f / 360.0f) * 2.0f * PI)
|
||||
{
|
||||
|
||||
FVec3 Direction{ FMath::Cos(Angle), FMath::Sin(Angle), 0 };
|
||||
// With the grid
|
||||
FVisitor VisitorGrid(FVec3(53, 27, 0), Direction, 0, *Boxes);
|
||||
FVisitor VisitorGrid(FVec3(53, 27, 0) + LargeOffset, Direction, 0, *Boxes);
|
||||
VisitorGrid.HalfExtents = FVec3(102, 20, 2);
|
||||
{
|
||||
FAABBTreeDirtyGridCVars::DirtyElementGridCellSize = 100;
|
||||
@@ -641,7 +642,7 @@ namespace ChaosTest
|
||||
}
|
||||
|
||||
// Without the grid
|
||||
FVisitor VisitorNoGrid(FVec3(53, 27, 0), Direction, 0, *Boxes);
|
||||
FVisitor VisitorNoGrid(FVec3(53, 27, 0) + LargeOffset, Direction, 0, *Boxes);
|
||||
VisitorNoGrid.HalfExtents = FVec3(102, 20, 2);
|
||||
{
|
||||
FAABBTreeDirtyGridCVars::DirtyElementGridCellSize = 0;
|
||||
|
||||
Reference in New Issue
Block a user