Navigation
API > API/Runtime > API/Runtime/Engine
ShapeComponent is a PrimitiveComponent that is represented by a simple geometrical shape (sphere, capsule, box, etc).
| Name | UShapeComponent |
| Type | class |
| Header File | /Engine/Source/Runtime/Engine/Classes/Components/ShapeComponent.h |
| Include Path | #include "Components/ShapeComponent.h" |
Syntax
UCLASS (Abstract,
HideCategories=(Object, LOD, Lighting, TextureStreaming, Activation, "Components|Activation"),
EditInlineNew, Meta=(BlueprintSpawnableComponent), ShowCategories=(Mobility), MinimalAPI)
class UShapeComponent : public UPrimitiveComponent
Inheritance Hierarchy
- UObjectBase → UObjectBaseUtility → UObject → UActorComponent → USceneComponent → UPrimitiveComponent → UShapeComponent
Implements Interfaces
- IAsyncPhysicsStateProcessor
- IInterface_AssetUserData
- IInterface_AsyncCompilation
- INavRelevantInterface
- IPhysicsComponent
Derived Classes
Constructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
UShapeComponent
(
const FObjectInitializer& ObjectInitializer |
Components/ShapeComponent.h |
Variables
Public
| Name | Type | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|---|
| AreaClass | TSubclassOf< class UNavAreaBase > | Navigation area type (empty / none has no effect on underlying area type). | Components/ShapeComponent.h | |
| bDrawOnlyIfSelected | uint8 | Only show this component if the actor is selected | Components/ShapeComponent.h | |
| bDynamicObstacle | uint8 | If set, shape will be exported for navigation as dynamic modifier instead of using regular collision data | Components/ShapeComponent.h |
|
| bShouldCollideWhenPlacing | uint8 | If true it allows Collision when placing even if collision is not enabled | Components/ShapeComponent.h | |
| ShapeBodySetup | TObjectPtr< class UBodySetup > | Description of collision | Components/ShapeComponent.h |
|
| ShapeColor | FColor | Color used to draw the shape. | Components/ShapeComponent.h |
|
Functions
Public
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
TSubclassOf< class UNavAreaBase > GetDesiredAreaClass() |
Components/ShapeComponent.h | ||
void SetAreaClassOverride
(
TSubclassOf< class UNavAreaBase > InAreaClassOverride |
Components/ShapeComponent.h | ||
void SetLineThickness
(
float Thickness |
Set the LineThickness. | Components/ShapeComponent.h |
|
void SetUseSystemDefaultObstacleAreaClass() |
Components/ShapeComponent.h | ||
virtual void UpdateBodySetup() |
Update the body setup parameters based on shape information | Components/ShapeComponent.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/ShapeComponent.h | |
virtual UBodySetup * GetBodySetup() |
Return the BodySetup to use for this PrimitiveComponent (single body case) | Components/ShapeComponent.h | |
virtual bool GetIgnoreBoundsForEditorFocus () |
Whether or not the bounds of this component should be considered when focusing the editor camera to an actor with this component in it. | Components/ShapeComponent.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/ShapeComponent.h | |
virtual bool ShouldCollideWhenPlacing() |
If true, bounds should be used when placing component/actor in level. Does not affect spawning. | Components/ShapeComponent.h |
Overridden from UActorComponent
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual bool IsNavigationRelevant() |
Override to specify that a component is relevant to the navigation system | Components/ShapeComponent.h |
Overridden from UObject
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual void PostEditChangeProperty
(
FPropertyChangedEvent& PropertyChangedEvent |
Components/ShapeComponent.h | ||
virtual void Serialize
(
FArchive& Ar |
Components/ShapeComponent.h |
Overridden from INavRelevantInterface
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual bool DoCustomNavigableGeometryExport
(
FNavigableGeometryExport& GeomExport |
Collects custom navigable geometry of component. | Components/ShapeComponent.h | |
virtual void GetNavigationData
(
FNavigationRelevantData& Data |
Prepares navigation modifiers | Components/ShapeComponent.h |
Protected
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
void AddShapeToGeomArray () |
Components/ShapeComponent.h | ||
void AddShapeToGeomArray () |
|||
void AddShapeToGeomArray () |
|||
void AddShapeToGeomArray () |
|||
void CreateShapeBodySetupIfNeeded() |
Components/ShapeComponent.h | ||
bool PrepareSharedBodySetup () |
Checks if a shared body setup is available (and if we're eligible for it). | Components/ShapeComponent.h | |
ENGINE_API void SetShapeToNewGeom
(
const FPhysicsShapeHandle& Shape |
|||
void SetShapeToNewGeom
(
const FPhysicsShapeHandle& Shape |
Components/ShapeComponent.h | ||
ENGINE_API void SetShapeToNewGeom
(
const FPhysicsShapeHandle& Shape |
|||
ENGINE_API void SetShapeToNewGeom
(
const FPhysicsShapeHandle& Shape |
Static
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
static void DeclareConstructClasses
(
TArray< FTopLevelAssetPath >& OutConstructClasses, |
Components/ShapeComponent.h |