USphereComponent

Inheritance Hierarchy

Syntax

class USphereComponent : public UShapeComponent

Remarks

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

Variables

Name Description

Protected variable

float

 

SphereRadius

The radius of the sphere

Functions

Name Description

Public function

float

 

GetScaledSphereRadius()

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

Public function

float

 

GetShapeScale()

Get the scale used by this shape.

Public function

float

 

GetUnscaledSphereRadius()

The radius of the sphere, ignoring component scale.

Public function

void

 

InitSphereRadius

(
    float InSphereRadius
)

Sets the sphere radius without triggering a render or physics update.

Public function

void

 

SetSphereRadius

(
    float InSphereRadius,
    bool bUpdateOverlaps
)

Change the sphere radius. This is the unscaled radius, 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

bool

 

AreSymmetricRotations

(
    const FQuat & A,
    const FQuat & B,
    const FVector & Scale3D
)

Returns true if the given transforms result in the same bounds, due to rotational symmetry.

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

void

 

CalcBoundingCylinder

(
    float& CylinderRadius,
    float& CylinderHalfHeight
)

Calculate the axis-aligned bounding cylinder of the component (radius in X-Y, half-height along Z axis).

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/SphereComponent.h