UShapeComponent

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

Windows
MacOS
Linux

Inheritance Hierarchy

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)

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?

References

Module

Engine

Header

Runtime/Engine/Classes/Components/ShapeComponent.h

Welcome to the new Unreal Engine 4 Documentation site!

We're working on lots of new features including a feedback system so you can tell us how we are doing. It's not quite ready for use in the wild yet, so head over to the Documentation Feedback forum to tell us about this page or call out any issues you are encountering in the meantime.

We'll be sure to let you know when the new system is up and running.

Post Feedback