Make relative position for generated trigger boxes

This commit is contained in:
bernatx 2022-07-21 12:05:20 +02:00 committed by bernat
parent 8f8d0fd47d
commit 27b93905bf
1 changed files with 1 additions and 0 deletions

View File

@ -80,6 +80,7 @@ FBoundingBox UBoundingBoxCalculator::GetActorBoundingBox(const AActor *Actor, ui
{
FBoundingBox Box = UBoundingBoxCalculator::CombineBoxes(TriggerVolumes);
FTransform Transform = Actor->GetTransform();
Box.Origin = Transform.InverseTransformPosition(Box.Origin);
Box.Rotation = Transform.InverseTransformRotation(Box.Rotation.Quaternion()).Rotator();
return Box;
}