UShapeComponent

ShapeComponent is a PrimitiveComponent that is represented by a simple geometrical shape (sphere, capsule, box, etc).

Windows
MacOS
Linux

Inheritance Hierarchy

References

Module

Engine

Header

/Engine/Source/Runtime/Engine/Classes/Components/ShapeComponent.h

Include

#include "Components/ShapeComponent.h"

Syntax

class UShapeComponent : public UPrimitiveComponent

Remarks

ShapeComponent is a PrimitiveComponent that is represented by a simple geometrical shape (sphere, capsule, box, etc).

Variables

Name Description

Public variable

TSubclassOf< cl...

 

AreaClass

Navigation area type (empty = default obstacle)

Public variable

uint8: 1

 

bDrawOnlyIfSelected

Only show this component if the actor is selected

Public variable

uint8: 1

 

bDynamicObstacle

If set, shape will be exported for navigation as dynamic modifier instead of using regular collision data

Public variable

uint8: 1

 

bShouldCollideWhenPlacing

If true it allows Collision when placing even if collision is not enabled

Protected variable

uint8: 1

 

bUseArchetypeBodySetup

If the body setup can be shared (i.e. there have been no alterations compared to the CDO)

Public variable

UBodySetup *...

 

ShapeBodySetup

Description of collision

Public variable

FColor

 

ShapeColor

Color used to draw the shape.

Constructors

Name Description

Public function

UShapeComponent

(
    const FObjectInitializer& ObjectIn...
)

Functions

Name Description

Protected function

void

 

AddShapeToGeomArray()

Protected function

void

 

AddShapeToGeomArray()

Protected function

void

 

AddShapeToGeomArray()

Protected function

void

 

AddShapeToGeomArray()

Protected function

void

 

CreateShapeBodySetupIfNeeded()

Protected function

bool

 

PrepareSharedBodySetup()

Checks if a shared body setup is available (and if we're eligible for it).

Protected function

void

 

SetShapeToNewGeom

(
    const FPhysicsShapeHandle& Shape
)

Protected function

void

 

SetShapeToNewGeom

(
    const FPhysicsShapeHandle& Shape
)

Protected function

void

 

SetShapeToNewGeom

(
    const FPhysicsShapeHandle& Shape
)

Protected function

void

 

SetShapeToNewGeom

(
    const FPhysicsShapeHandle& Shape
)

Public function Virtual

void

 

UpdateBodySetup()

Update the body setup parameters based on shape information

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 Const

bool

 

DoCustomNavigableGeometryExport

(
    FNavigableGeometryExport& GeomExpo...
)

Collects custom navigable geometry of component.

Public function Virtual

UBodySetup &...

 

GetBodySetup()

Return the BodySetup to use for this PrimitiveComponent (single body case)

Public function Virtual Const

bool

 

IgnoreBoundsForEditorFocus()

Whether or not the bounds of this component should be considered when focusing the editor camera to an actor with this component in it.

Overridden from USceneComponent

Name Description

Public function Virtual Const

FBoxSphereBo...

 

CalcBounds

(
    const FTransform& LocalToWorld
)

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

Public function Virtual Const

bool

 

ShouldCollideWhenPlacing()

If true, bounds should be used when placing component/actor in level. Does not affect spawning.

Overridden from UObject

Name Description

Public function Virtual

void

 

PostEditChangeProperty

(
    FPropertyChangedEvent& PropertyCha...
)

Called when a property on this object has been modified externally

Overridden from INavRelevantInterface

Name Description

Public function Virtual Const

void

 

GetNavigationData

(
    FNavigationRelevantData& Data
)

Prepare navigation modifiers

Public function Virtual Const

bool

 

IsNavigationRelevant()

Are modifiers active?

Help shape the future of Unreal Engine documentation! Tell us how we're doing so we can serve you better.
Take our survey
Dismiss