官方介绍:
Each Actor placed in a Level has a set of bounds using a box and a sphere that is used for various things in the Engine. One of those being specifically to test whether an it is visible or not. The bounds of an Actor is made up of two parts: a sphere and a box. The bounding sphere is used for fast collision detection with a simple distance test, and, more often than not, it's greater in size than the object it contains. On the other hand, the bounding box is a closer match to the shape of the object and provides more accurate results.
Visualize bounds of Actors in the Level Viewport by selecting Show > Advanced > Bounds. Alternatively, in the Skeletal Mesh Editor you can select Character > Bounds and in the Static Mesh Editor, select Bounds in the main toolbar.
An Actor with its bounds (sphere and box) displayed.
Each Static Mesh and Skeletal Mesh has its own bounding box and sphere that automatically scales to the size of the geometry when imported, or when scaled or rotated in the viewport.
You can edit an Actor's bounds using the following ways:
Click image for full size.
Increasing an Actor's bounds can potentially impact performance and shadow quality by keeping the Actor from be culled sooner than it would otherwise have been.
源码解释:
/**
* Scales the bounds of the object.
* This is useful when using World Position Offset to animate the vertices of the object outside of its bounds.
* Warning: Increasing the bounds of an object will reduce performance and shadow quality!
* Currently only used by StaticMeshComponent and SkeletalMeshComponent.
*/
UPROPERTY(EditAnywhere, AdvancedDisplay, Category=Rendering, meta=(UIMin = "1", UIMax = "10.0"))
float BoundsScale;
使用:
玩家快速走过,相机视角可看到某物体,可以适当增加BoundsScale,但是降低性能。相机视角渲染,会根据Bounds检测是否渲染裁剪剔除。