![]() |
UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
|
#include <SlateSprings.h>
Classes | |
| class | FSpringConfig |
Public Member Functions | |
| TSpring1D () | |
| TSpring1D (FloatType InPosition) | |
| void | SetConfig (const FSpringConfig &InConfig) |
| void | SetPosition (FloatType InPosition) |
| FloatType | GetPosition () const |
| void | SetTarget (FloatType InTarget) |
| FloatType | GetTarget () const |
| bool | IsAtRest () |
| void | Tick (float InQuantum) |
One-dimensional spring simulation
|
inline |
Constructor
|
inline |
Construct at specified position
Gets the current position of the spring
Gets the target position
|
inline |
Sets the config for this spring
| InConfig | New configuration |
|
inline |
Sets the current position (and target position) for the spring
| InTarget | New position |
Sets the target position for the spring
| InTarget | New target position |
Updates the simulation. Should be called every tick!
| InQuantum | Time passed since last update |