Navigation
API > API/Runtime > API/Runtime/Engine
A box generally used for simple collision. Bounds are rendered as lines in the editor.
| Name | UBoxComponent |
| Type | class |
| Header File | /Engine/Source/Runtime/Engine/Classes/Components/BoxComponent.h |
| Include Path | #include "Components/BoxComponent.h" |
Syntax
UCLASS (ClassGroup="Collision", HideCategories=(Object, LOD, Lighting, TextureStreaming),
EditInlineNew, Meta=(DisplayName="Box Collision", BlueprintSpawnableComponent), MinimalAPI)
class UBoxComponent : public UShapeComponent
Inheritance Hierarchy
- UObjectBase → UObjectBaseUtility → UObject → UActorComponent → USceneComponent → UPrimitiveComponent → UShapeComponent → UBoxComponent
Implements Interfaces
- IAsyncPhysicsStateProcessor
- IInterface_AssetUserData
- IInterface_AsyncCompilation
- INavRelevantInterface
- IPhysicsComponent
Derived Classes
Constructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
UBoxComponent
(
const FObjectInitializer& ObjectInitializer |
Components/BoxComponent.h |
Functions
Public
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
FVector GetScaledBoxExtent() |
Components/BoxComponent.h |
|
|
FEngineShowFlags GetShowFlags() |
Components/BoxComponent.h | ||
FVector GetUnscaledBoxExtent() |
Components/BoxComponent.h |
|
|
void InitBoxExtent
(
const FVector& InBoxExtent |
Sets the box extents without triggering a render or physics update. | Components/BoxComponent.h | |
void SetBoxExtent
(
FVector InBoxExtent, |
Change the box extent size. This is the unscaled size, before component scale is applied. | Components/BoxComponent.h |
|
void SetShowFlags
(
const FEngineShowFlags& InShowFlags |
Components/BoxComponent.h |
Overridden from UShapeComponent
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual void UpdateBodySetup() |
Update the body setup parameters based on shape information | Components/BoxComponent.h |
Overridden from UPrimitiveComponent
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual FPrimitiveSceneProxy * CreateSceneProxy() |
Creates a proxy to represent the primitive to the scene manager in the rendering thread. | Components/BoxComponent.h | |
virtual FCollisionShape GetCollisionShape
(
float Inflation |
Return a CollisionShape that most closely matches this primitive. | Components/BoxComponent.h | |
virtual bool IsZeroExtent () |
This isn't bound extent, but for shape component to utilize extent is 0. | Components/BoxComponent.h |
Overridden from USceneComponent
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual FBoxSphereBounds CalcBounds
(
const FTransform& LocalToWorld |
Calculate the bounds of the component. Default behavior is a bounding box/sphere of zero size. | Components/BoxComponent.h |