UPhysicsSpringComponent

This component is still work in progress.

Choose your operating system:

Windows

macOS

Linux

Inheritance Hierarchy

References

Module

Engine

Header

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

Include

#include "PhysicsEngine/PhysicsSpringComponent.h"

Syntax

class UPhysicsSpringComponent : public USceneComponent

Remarks

This component is still work in progress. Uses raycast springs for simple vehicle forces Used with objects that have physics to create a spring down the X direction ie. point X in the direction you want generate spring.

Variables

Name Description

Public variable

bool

 

bIgnoreSelf

If true, the spring will ignore all components in its own actor

Public variable

TEnumAsByte< en...

 

SpringChannel

Strength of thrust force applied to the base object.

Public variable

float

 

SpringCompression

The current compression of the spring. A spring at rest will have SpringCompression 0.

Public variable

float

 

SpringDamping

Specifies how quickly the spring can absorb energy of a body.

Public variable

float

 

SpringLengthAtRest

Determines how long the spring will be along the X-axis at rest.

Public variable

float

 

SpringRadius

Determines the radius of the spring.

Public variable

float

 

SpringStiffness

Specifies how much strength the spring has.

Constructors

Name Description

Public function

UPhysicsSpringComponent

(
    const FObjectInitializer& ObjectIn...
)

Functions

Name Description

Public function Const

float

 

GetNormalizedCompressionScalar()

Returns the spring compression as a normalized scalar along spring direction.

Public function Const

FVector

 

GetSpringCurrentEndPoint()

Returns the spring current end point in world space.

Public function Const

FVector

 

GetSpringDirection()

Returns the spring direction from start to resting point

Public function Const

FVector

 

GetSpringRestingPoint()

Returns the spring resting point in world space.

Overridden from UActorComponent

Name Description

Public function Virtual

void

 

TickComponent

(
    float DeltaTime,
    enum ELevelTick TickType,
    FActorComponentTickFunction* T...
)

Function called every frame on this ActorComponent.