Navigation
API > API/Runtime > API/Runtime/Engine > API/Runtime/Engine/Components
Inheritance Hierarchy
- UObjectBase
- UObjectBaseUtility
- UObject
- UActorComponent
- USceneComponent
- UPrimitiveComponent
- UShapeComponent
- UBoxComponent
- UOceanBoxCollisionComponent
References
| Module | Engine |
| Header | /Engine/Source/Runtime/Engine/Classes/Components/BoxComponent.h |
| Include | #include "Components/BoxComponent.h" |
Syntax
class UBoxComponent : public UShapeComponent
Remarks
A box generally used for simple collision. Bounds are rendered as lines in the editor.
Variables
| Type | Name | Description | |
|---|---|---|---|
| FVector | BoxExtent | The extents (radii dimensions) of the box | |
| float | LineThickness | Used to control the line thickness when rendering |
Constructors
| Type | Name | Description | |
|---|---|---|---|
UBoxComponent
(
const FObjectInitializer& ObjectInitializer |
Functions
| Type | Name | Description | |
|---|---|---|---|
| FVector | |||
| FVector | |||
| void | InitBoxExtent
(
const FVector& InBoxExtent |
Sets the box extents without triggering a render or physics update. | |
| void | SetBoxExtent
(
FVector InBoxExtent, |
Change the box extent size. This is the unscaled size, before component scale is applied. | |
| void | SetLineThickness
(
float Thickness |
Set the LineThickness. |
Overridden from UShapeComponent
| Type | Name | Description | |
|---|---|---|---|
| void | Update the body setup parameters based on shape information |
Overridden from UPrimitiveComponent
| Type | Name | Description | |
|---|---|---|---|
| FPrimitiveSceneProxy * | Creates a proxy to represent the primitive to the scene manager in the rendering thread. | ||
| FCollisionShape | GetCollisionShape
(
float Inflation |
Return a CollisionShape that most closely matches this primitive. | |
| bool | IsZeroExtent () |
This isn't bound extent, but for shape component to utilize extent is 0. |
Overridden from USceneComponent
| Type | Name | Description | |
|---|---|---|---|
| FBoxSphereBounds | CalcBounds
(
const FTransform& LocalToWorld |
Calculate the bounds of the component. Default behavior is a bounding box/sphere of zero size. |