Navigation
API > API/Runtime > API/Runtime/PhysicsCore
Collision Shapes that supports Sphere, Capsule, Box, or Line
| Name | FCollisionShape |
| Type | struct |
| Header File | /Engine/Source/Runtime/PhysicsCore/Public/CollisionShape.h |
| Include Path | #include "CollisionShape.h" |
Syntax
struct FCollisionShape
Constructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
FCollisionShape() |
CollisionShape.h |
Constants
| Name | Type | Remarks | Include Path |
|---|---|---|---|
| LineShape | struct FCollisionShape | Used by engine in multiple places. | CollisionShape.h |
Variables
Public
| Name | Type | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|---|
| Box | FCollisionShape | CollisionShape.h | ||
| Capsule | FCollisionShape | CollisionShape.h | ||
| FCollisionShape | union FCollisionShape | Union that supports up to 3 floats | CollisionShape.h | |
| HalfExtentX | float | CollisionShape.h | ||
| HalfExtentY | float | CollisionShape.h | ||
| HalfExtentZ | float | CollisionShape.h | ||
| HalfHeight | float | CollisionShape.h | ||
| Radius | float | CollisionShape.h | ||
| ShapeType | ECollisionShape::Type | CollisionShape.h | ||
| Sphere | FCollisionShape | CollisionShape.h |
Functions
Public
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
FVector GetBox() |
Utility function to get Box Extention | CollisionShape.h | |
float GetCapsuleAxisHalfLength() |
Get distance from center of capsule to center of sphere ends | CollisionShape.h | |
const float GetCapsuleHalfHeight () |
Utility function to get Capsule Half Height. | CollisionShape.h | |
const float GetCapsuleRadius() |
Utility function to get Capsule Radius | CollisionShape.h | |
FVector GetExtent() |
Utility function to return Extent of the shape | CollisionShape.h | |
const float GetSphereRadius() |
Utility function to get Sphere Radius | CollisionShape.h | |
FCollisionShape Inflate
(
const float Inflation |
CollisionShape.h | ||
bool IsBox() |
Is the shape currently a box? | CollisionShape.h | |
bool IsCapsule() |
Is the shape currently a capsule? | CollisionShape.h | |
bool IsLine() |
Is the shape currently a Line (Default)? | CollisionShape.h | |
bool IsNearlyZero() |
Return true if nearly zero. If so, it will back out and use line trace instead | CollisionShape.h | |
bool IsSphere() |
Is the shape currently a sphere? | CollisionShape.h | |
void SetBox
(
const FVector3f& HalfExtent |
Utility function to Set Box and dimension | CollisionShape.h | |
void SetCapsule
(
const FVector3f& Extent |
Utility function to set Capsule from Extent data | CollisionShape.h | |
void SetCapsule
(
const float Radius, |
Utility function to set Capsule with Radius and Half Height. | CollisionShape.h | |
void SetShape
(
const ECollisionShape::Type InShapeType, |
Utility function to set a shape from a type and extent | CollisionShape.h | |
void SetSphere
(
const float Radius |
Utility function to set Sphere with Radius | CollisionShape.h | |
FString ToString() |
CollisionShape.h |
Static
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
static FCollisionShape MakeBox
(
const FVector3f& BoxHalfExtent |
Static utility function to make a box | CollisionShape.h | |
static FCollisionShape MakeBox
(
const FVector& BoxHalfExtent |
Static utility function to make a box | CollisionShape.h | |
static FCollisionShape MakeCapsule
(
const float CapsuleRadius, |
Static utility function to make a capsule. | CollisionShape.h | |
static FCollisionShape MakeCapsule
(
const FVector& Extent |
Static utility function to make a capsule | CollisionShape.h | |
static FCollisionShape MakeSphere
(
const float SphereRadius |
Static utility function to make a sphere | CollisionShape.h | |
static float MinBoxExtent() |
CollisionShape.h | ||
static float MinCapsuleAxisHalfHeight() |
CollisionShape.h | ||
static float MinCapsuleRadius() |
CollisionShape.h | ||
static float MinSphereRadius() |
CollisionShape.h |