Navigation
Unreal Engine C++ API Reference > Runtime > Engine > Components
Inheritance Hierarchy
- UObjectBase
- UObjectBaseUtility
- UObject
- UActorComponent
- USceneComponent
- UPrimitiveComponent
- UShapeComponent
- USphereComponent
- UDrawSphereComponent
References
Module | Engine |
Header | /Engine/Source/Runtime/Engine/Classes/Components/SphereComponent.h |
Include | #include "Components/SphereComponent.h" |
Syntax
UCLASS (ClassGroup="Collision", EditInlineNew,
HideCategories=(Object, LOD, Lighting, TextureStreaming),
Meta=(DisplayName="Sphere Collision", BlueprintSpawnableComponent), MinimalAPI)
class USphereComponent : public UShapeComponent
Remarks
A sphere generally used for simple collision. Bounds are rendered as lines in the editor.
Variables
Type | Name | Description | |
---|---|---|---|
![]() ![]() ![]() ![]() ![]() |
float | SphereRadius | The radius of the sphere |
Constructors
Type | Name | Description | |
---|---|---|---|
![]() |
USphereComponent
(
const FObjectInitializer& ObjectInitializer |
Functions
Type | Name | Description | |
---|---|---|---|
![]() ![]() ![]() ![]() |
float | ||
![]() ![]() ![]() ![]() |
float | Get the scale used by this shape. | |
![]() ![]() ![]() ![]() |
float | ||
![]() |
void | InitSphereRadius
(
float InSphereRadius |
Sets the sphere radius without triggering a render or physics update. |
![]() ![]() ![]() |
void | SetSphereRadius
(
float InSphereRadius, |
Change the sphere radius. This is the unscaled radius, before component scale is applied. |
Overridden from UShapeComponent
Type | Name | Description | |
---|---|---|---|
![]() ![]() |
void | Update the body setup parameters based on shape information |
Overridden from UPrimitiveComponent
Type | Name | Description | |
---|---|---|---|
![]() ![]() ![]() |
bool | AreSymmetricRotations
(
const FQuat& A, |
Returns true if the given transforms result in the same bounds, due to rotational symmetry. |
![]() ![]() |
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 | |
---|---|---|---|
![]() ![]() ![]() |
void | CalcBoundingCylinder
(
float& CylinderRadius, |
Calculate the axis-aligned bounding cylinder of the component (radius in X-Y, half-height along Z axis). |
![]() ![]() ![]() |
FBoxSphereBounds | CalcBounds
(
const FTransform& LocalToWorld |
Calculate the bounds of the component. Default behavior is a bounding box/sphere of zero size. |