Navigation
API > API/Runtime > API/Runtime/Engine
Note: 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.
| Name | UPhysicsSpringComponent |
| Type | class |
| Header File | /Engine/Source/Runtime/Engine/Classes/PhysicsEngine/PhysicsSpringComponent.h |
| Include Path | #include "PhysicsEngine/PhysicsSpringComponent.h" |
Syntax
UCLASS (HideCategories=(Object, Mobility, LOD), ClassGroup=Physics, ShowCategories=Trigger,
MinimalAPI)
class UPhysicsSpringComponent : public USceneComponent
Inheritance Hierarchy
- UObjectBase → UObjectBaseUtility → UObject → UActorComponent → USceneComponent → UPhysicsSpringComponent
Implements Interfaces
Constructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
UPhysicsSpringComponent
(
const FObjectInitializer& ObjectInitializer |
PhysicsEngine/PhysicsSpringComponent.h |
Variables
Public
| Name | Type | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|---|
| bIgnoreSelf | bool | If true, the spring will ignore all components in its own actor | PhysicsEngine/PhysicsSpringComponent.h |
|
| SpringChannel | TEnumAsByte< enum ECollisionChannel > | Strength of thrust force applied to the base object. | PhysicsEngine/PhysicsSpringComponent.h |
|
| SpringCompression | float | The current compression of the spring. A spring at rest will have SpringCompression 0. | PhysicsEngine/PhysicsSpringComponent.h |
|
| SpringDamping | float | Specifies how quickly the spring can absorb energy of a body. | PhysicsEngine/PhysicsSpringComponent.h |
|
| SpringLengthAtRest | float | Determines how long the spring will be along the X-axis at rest. | PhysicsEngine/PhysicsSpringComponent.h |
|
| SpringRadius | float | Determines the radius of the spring. | PhysicsEngine/PhysicsSpringComponent.h |
|
| SpringStiffness | float | Specifies how much strength the spring has. | PhysicsEngine/PhysicsSpringComponent.h |
|
Protected
| Name | Type | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|---|
| CurrentEndPoint | FVector | PhysicsEngine/PhysicsSpringComponent.h |
Functions
Public
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
float GetNormalizedCompressionScalar () |
Returns the spring compression as a normalized scalar along spring direction. | PhysicsEngine/PhysicsSpringComponent.h |
|
FVector GetSpringCurrentEndPoint() |
Returns the spring current end point in world space. | PhysicsEngine/PhysicsSpringComponent.h |
|
FVector GetSpringDirection() |
Returns the spring direction from start to resting point | PhysicsEngine/PhysicsSpringComponent.h |
|
FVector GetSpringRestingPoint() |
Returns the spring resting point in world space. | PhysicsEngine/PhysicsSpringComponent.h |
|
Overridden from UActorComponent
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual void TickComponent
(
float DeltaTime, |
Function called every frame on this ActorComponent. | PhysicsEngine/PhysicsSpringComponent.h |