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