Make relative position for generated trigger boxes
This commit is contained in:
parent
8f8d0fd47d
commit
27b93905bf
|
@ -80,6 +80,7 @@ FBoundingBox UBoundingBoxCalculator::GetActorBoundingBox(const AActor *Actor, ui
|
||||||
{
|
{
|
||||||
FBoundingBox Box = UBoundingBoxCalculator::CombineBoxes(TriggerVolumes);
|
FBoundingBox Box = UBoundingBoxCalculator::CombineBoxes(TriggerVolumes);
|
||||||
FTransform Transform = Actor->GetTransform();
|
FTransform Transform = Actor->GetTransform();
|
||||||
|
Box.Origin = Transform.InverseTransformPosition(Box.Origin);
|
||||||
Box.Rotation = Transform.InverseTransformRotation(Box.Rotation.Quaternion()).Rotator();
|
Box.Rotation = Transform.InverseTransformRotation(Box.Rotation.Quaternion()).Rotator();
|
||||||
return Box;
|
return Box;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue