UBoxComponent

Inheritance Hierarchy

Syntax

class UBoxComponent : public UShapeComponent

Remarks

A box generally used for simple collision. Bounds are rendered as lines in the editor.

Variables

Name Description

Protected variable

FVector

 

BoxExtent

The extents (radii dimensions) of the box

Functions

Name Description

Public function

FVector

 

GetScaledBoxExtent()

-------------- INLINES ------------

Public function

FVector

 

GetUnscaledBoxExtent()

The box extent, ignoring component scale.

Public function

void

 

InitBoxExtent

(
    const FVector & InBoxExtent
)

Sets the box extents without triggering a render or physics update.

Public function

void

 

SetBoxExtent

(
    FVector InBoxExtent,
    bool bUpdateOverlaps
)

Change the box extent size. This is the unscaled size, before component scale is applied.

Overridden from UShapeComponent

Name Description

Public function Virtual

void

 

UpdateBodySetup()

WITH_EDITOR.

Overridden from UPrimitiveComponent

Name Description

Public function Virtual

FPrimitiveSc ...

 

CreateSceneProxy()

Creates a proxy to represent the primitive to the scene manager in the rendering thread.

Public function Virtual

FCollisionSh ...

 

GetCollisionShape

(
    float Inflation
)

Return a CollisionShape that most closely matches this primitive.

Public function Virtual

bool

 

IsZeroExtent()

This isn't bound extent, but for shape component to utilize extent is 0.

Overridden from USceneComponent

Name Description

Public function Virtual

FBoxSphereBo ...

 

CalcBounds

(
    const FTransform & LocalToWorld
)

Calculate the bounds of the component. Default behavior is a bounding box/sphere of zero size.

References

Module

Engine

Header

Runtime/Engine/Classes/Components/BoxComponent.h