FKSphylElem

Capsule shape used for collision. Z axis is capsule axis.

Windows
MacOS
Linux

Inheritance Hierarchy

FKShapeElem

FKSphylElem

References

Module

Engine

Header

/Engine/Source/Runtime/Engine/Classes/PhysicsEngine/SphylElem.h

Include

#include "PhysicsEngine/SphylElem.h"

Syntax

struct FKSphylElem : public FKShapeElem

Remarks

Capsule shape used for collision. Z axis is capsule axis.

Variables

Name Description

Public variable

FVector

 

Center

Position of the capsule's origin

Public variable

float

 

Length

This is of line-segment ie. add Radius to both ends to find total length.

Public variable

float

 

Radius

Radius of the capsule

Public variable

FRotator

 

Rotation

Rotation of the capsule

Constructors

Name Description

Public function

FKSphylElem()

Public function

FKSphylElem

(
    float InRadius,
    float InLength
)

Functions

Name Description

Public function Const

FBox

 

CalcAABB

(
    const FTransform& BoneTM,
    float Scale
)

Public function Const

void

 

DrawElemSolid

(
    FPrimitiveDrawInterface* PDI,
    const FTransform& ElemTM,
    const FVector& Scale3D,
    const FMaterialRenderProxy* Ma...
)

Public function Const

void

 

DrawElemWire

(
    FPrimitiveDrawInterface* PDI,
    const FTransform& ElemTM,
    const FVector& Scale3D,
    const FColor Color
)

Public function

void

 

FixupDeprecated

(
    FArchive& Ar
)

Public function Const

float

 

GetClosestPointAndNormal

(
    const FVector& WorldPosition,
    const FTransform& BodyToWorldTM,
    FVector& ClosestWorldPosition,
    FVector& Normal
)

Finds the closest point on the shape given a world position.

Public function Const

void

 

GetElemSolid

(
    const FTransform& ElemTM,
    const FVector& Scale3D,
    const FMaterialRenderProxy* Ma...,
    int32 ViewIndex,
    FMeshElementCollector& Collector
)

Public function Const

FKSphylElem

 

GetFinalScaled

(
    const FVector& Scale3D,
    const FTransform& RelativeTM
)

Public function Const

float

 

GetScaledCylinderLength

(
    const FVector& Scale3D
)

Returns the scaled length of the cylinder part of the Sphyl

Public function Const

float

 

GetScaledHalfLength

(
    const FVector& Scale3D
)

Returns half of the total scaled length of the Sphyl, which includes the scaled top and bottom caps

Public function Const

float

 

GetScaledRadius

(
    const FVector& Scale3D
)

Returns the scaled radius for this Sphyl, which is determined by the Max scale on X/Y and clamped by half the total length

Public function Const

float

 

GetShortestDistanceToPoint

(
    const FVector& WorldPosition,
    const FTransform& BodyToWorldTM
)

Finds the shortest distance between the element and a world position.

Public function Const

FTransform

 

GetTransform()

Utility function that builds an FTransform from the current data.

Public function Const

float

 

GetVolume

(
    const FVector& Scale
)

Public function

void

 

ScaleElem

(
    FVector DeltaSize,
    float MinSize
)

Public function

void

 

SetTransform

(
    const FTransform& InTransform
)

Constants

Name

Description

StaticShapeType

Deprecated Variables

Name Description

Public variable

FQuat

 

Orientation_DEPRECATED

Public variable

FMatrix

 

TM_DEPRECATED

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