Navigation
API > API/Plugins > API/Plugins/CableComponent
Component that allows you to specify custom triangle mesh geometry
| Name | UCableComponent |
| Type | class |
| Header File | /Engine/Plugins/Runtime/CableComponent/Source/CableComponent/Classes/CableComponent.h |
| Include Path | #include "CableComponent.h" |
Syntax
UCLASS (MinimalAPI, HideCategories=(Object, Physics, Activation, "Components|Activation"),
EditInlineNew, Meta=(BlueprintSpawnableComponent), ClassGroup=Rendering)
class UCableComponent : public UMeshComponent
Inheritance Hierarchy
- UObjectBase → UObjectBaseUtility → UObject → UActorComponent → USceneComponent → UPrimitiveComponent → UMeshComponent → UCableComponent
Implements Interfaces
- IAsyncPhysicsStateProcessor
- IInterface_AssetUserData
- IInterface_AsyncCompilation
- INavRelevantInterface
- IPhysicsComponent
Constructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
UCableComponent
(
const FObjectInitializer& ObjectInitializer |
CableComponent.h |
Variables
Public
| Name | Type | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|---|
| AttachEndTo | FComponentReference | Actor or Component that the defines the end position of the cable | CableComponent.h |
|
| AttachEndToSocketName | FName | Socket name on the AttachEndTo component to attach to | CableComponent.h |
|
| bAttachEnd | bool | Should we fix the end to something (using AttachEndTo and EndLocation), or leave it free. | CableComponent.h |
|
| bAttachStart | bool | Should we fix the start to something, or leave it free. | CableComponent.h |
|
| bEnableCollision | bool | EXPERIMENTAL. | CableComponent.h |
|
| bEnableStiffness | bool | Add stiffness constraints to cable. | CableComponent.h |
|
| bResetAfterTeleport | bool | Always reset cable particle positions and velocities on a teleport. | CableComponent.h |
|
| bSkipCableUpdateWhenNotOwnerRecentlyRendered | bool | CableComponent.h |
|
|
| bSkipCableUpdateWhenNotVisible | bool | CableComponent.h |
|
|
| bTeleportAfterReattach | bool | Teleport the cable particles on reattaching any end of the cable. | CableComponent.h |
|
| bUseSubstepping | bool | When false, will still wait for SubstepTime to elapse before updating, but will only run the cable simulation once using all of accumulated simulation time | CableComponent.h |
|
| CableForce | FVector | Force vector (world space) applied to all particles in cable. | CableComponent.h |
|
| CableGravityScale | float | Scaling applied to world gravity affecting this cable. | CableComponent.h |
|
| CableLength | float | Rest length of the cable | CableComponent.h |
|
| CableWidth | float | How wide the cable geometry is | CableComponent.h |
|
| CollisionFriction | float | If collision is enabled, control how much sliding friction is applied when cable is in contact. | CableComponent.h |
|
| EndLocation | FVector | End location of cable, relative to AttachEndTo (or AttachEndToSocketName) if specified, otherwise relative to cable component. | CableComponent.h |
|
| NumSegments | int32 | How many segments the cable has | CableComponent.h |
|
| NumSides | int32 | Number of sides of the cable geometry | CableComponent.h |
|
| SolverIterations | int32 | The number of solver iterations controls how 'stiff' the cable is | CableComponent.h |
|
| SubstepTime | float | Controls the simulation substep time for the cable | CableComponent.h |
|
| TeleportDistanceThreshold | float | Conduct teleportation if the movement of either fixed end point of the cable is greater than this threshold in 1 frame. | CableComponent.h |
|
| TeleportRotationThreshold | float | Rotation threshold in degrees. | CableComponent.h |
|
| TileMaterial | float | How many times to repeat the material along the length of the cable | CableComponent.h |
|
Protected
| Name | Type | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|---|
| bLastEndAttached | bool | CableComponent.h | ||
| bLastStartAttached | bool | CableComponent.h | ||
| LastEndLocation | FVector | CableComponent.h | ||
| LastEndPoint | FVector | CableComponent.h | ||
| LastEndPointTransform | FTransform | CableComponent.h | ||
| LastStartPoint | FVector | CableComponent.h | ||
| LastTransform | FTransform | Previous cable state for teleport corrections | CableComponent.h | |
| Particles | TArray< FCableParticle > | Array of cable particles | CableComponent.h | |
| TimeRemainder | float | Amount of time 'left over' from last tick | CableComponent.h |
Functions
Public
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
AActor * GetAttachedActor() |
Gets the Actor that the cable is attached to | CableComponent.h |
|
USceneComponent * GetAttachedComponent() |
Gets the specific USceneComponent that the cable is attached to | CableComponent.h |
|
void GetCableParticleLocations
(
TArray< FVector >& Locations |
Get array of locations of particles (in world space) making up the cable simulation. | CableComponent.h |
|
| Attaches the end of the cable to a specific Component within an Actor | CableComponent.h |
|
|
void SetAttachEndToComponent
(
USceneComponent* Component, |
Attaches the end of the cable to a specific Component | CableComponent.h |
|
Overridden from UPrimitiveComponent
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual FPrimitiveSceneProxy * CreateSceneProxy() |
CableComponent.h | ||
virtual int32 GetNumMaterials() |
CableComponent.h |
Overridden from USceneComponent
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual FBoxSphereBounds CalcBounds
(
const FTransform& LocalToWorld |
CableComponent.h | ||
virtual bool DoesSocketExist
(
FName InSocketName |
CableComponent.h | ||
virtual FTransform GetSocketTransform
(
FName InSocketName, |
CableComponent.h | ||
virtual bool HasAnySockets() |
CableComponent.h | ||
virtual void OnVisibilityChanged() |
CableComponent.h | ||
virtual void QuerySupportedSockets
(
TArray< FComponentSocketDescription >& OutSockets |
CableComponent.h |
Overridden from UActorComponent
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual void ApplyWorldOffset
(
const FVector& InOffset, |
CableComponent.h | ||
virtual void CreateRenderState_Concurrent
(
FRegisterComponentContext* Context |
CableComponent.h | ||
virtual void OnRegister() |
CableComponent.h | ||
virtual void SendRenderDynamicData_Concurrent() |
CableComponent.h | ||
virtual void TickComponent
(
float DeltaTime, |
CableComponent.h |