UInterpToMovementComponent

Inheritance Hierarchy

Syntax

class UInterpToMovementComponent : public UMovementComponent

Remarks

Move the root component between a series of points over a given time *

Variables

Name Description

Protected variable

bool

 

bContainsActorControlPoints

Are there any actor control points in use

Public variable

EInterpToBehavi ...

 

BehaviourType

Movement behaviour of the component

Public variable

uint32 : 1

 

bForceSubStepping

If true, forces sub-stepping to break up movement into discrete smaller steps to improve accuracy of the trajectory.

Protected variable

bool

 

bIsWaiting

Have we hit something and are waiting for it to move to carry on moving

Public variable

uint32 : 1

 

bPauseOnImpact

If true, will pause movement on impact.

Protected variable

bool

 

bStopped

Have we stopped (because we hit something, or reached the end of the cycle

Public variable

TArray < FInterp ...

 

ControlPoints

List of control points to visit.

Protected variable

float

 

CurrentDirection

Current direction along spline timeline

Protected variable

float

 

CurrentTime

Current position on spline

Public variable

float

 

Duration

How long to take to move from the first point to the last (or vice versa)

Public variable

int32

 

MaxSimulationIterations

Max number of iterations used for each discrete simulation step.

Public variable

float

 

MaxSimulationTimeStep

Max time delta for each discrete simulation step.

Public variable

FOnInterpToReve ...

 

OnInterpToReverse

Called when InterpTo impacts something and reverse is enabled.

Public variable

FOnInterpToStop ...

 

OnInterpToStop

Called when InterpTo has come to a stop.

Public variable

FOnInterpToRese ...

 

OnResetDelegate

Called when InterpTo reached the end and reset back to start .

Public variable

FOnInterpToWait ...

 

OnWaitBeginDelegate

Called when InterpTo has come to a stop but will resume when possible.

Public variable

FOnInterpToWait ...

 

OnWaitEndDelegate

Called when InterpTo has resumed following a stop.

Protected variable

float

 

TimeMultiplier

User to

Constructors

Name Description

Public function

UInterpToMovementComponent

(
    const FObjectInitializer & ObjectIn...
)

Functions

Name Description

Public function Virtual

void

 

AddControlPointPosition

(
    FVector Pos,
    bool bPositionIsRelative
)

Add a control point that represents a position.

Protected function

float

 

CalculateNewTime

(
    float TimeNow,
    float Delta,
    FHitResult & HitResult,
    bool InBroadcastEvent,
    bool& OutStopped,
    float& OutTimeRemainder
)

Calculate the new current time

Public function Virtual

bool

 

CheckStillInWorld()

This will check to see if the InterpTo is still in the world.

Protected function Virtual Const

FVector

 

ComputeMoveDelta

(
    float Time
)

Compute the distance for the given time.

Public function

void

 

FinaliseControlPoints()

Initialise the control points array.

Public function Const

float

 

GetSimulationTimeStep

(
    float RemainingTime,
    int32 Iterations
)

Compute remaining time step given remaining time and current iterations.

Protected function

bool

 

HandleHitWall

(
    const FHitResult & Hit,
    float TimeTick,
    const FVector & MoveDelta
)

Public function

bool

 

HasStoppedSimulation()

Public function

void

 

ResetControlPoints()

Clear the control points array and set to stopped.

Public function

void

 

RestartMovement

(
    float InitialDirection
)

Reset to start. Sets time to zero and direction to 1.

Protected function

void

 

ReverseDirection

(
    const FHitResult & Hit,
    float Time,
    bool InBroadcastEvent
)

Reverse direction we are moving

Public function Virtual Const

bool

 

ShouldUseSubStepping()

Determine whether or not to use substepping in the InterpTo motion update.

Public function

void

 

StopSimulating

(
    const FHitResult & HitResult
)

Clears the reference to UpdatedComponent, fires stop event, and stops ticking.

Protected function Virtual

void

 

UpdateControlPoints

(
    bool InForceUpdate
)

Update the control points.

Overridden from UMovementComponent

Name Description

Protected function Virtual

void

 

HandleImpact

(
    const FHitResult & Hit,
    float TimeSlice,
    const FVector & MoveDelta
)

Deal with an impact. Change direction, stop etc depending on the current behaviour setting.

Public function Virtual

void

 

StopMovementImmediately()

Stops movement immediately (zeroes velocity, usually zeros acceleration for components with acceleration).

Overridden from UActorComponent

Name Description

Public function Virtual

void

 

ApplyWorldOffset

(
    const FVector & InOffset,
    bool bWorldShift
)

Called by owner actor on position shifting Component should update all relevant data structures to reflect new actor location

Public function Virtual

void

 

BeginPlay()

BeginsPlay for the component.

Public function Virtual

void

 

TickComponent

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

Function called every frame on this ActorComponent.

Overridden from UObject

Name Description

Public function Virtual

void

 

PostEditChangeProperty

(
    FPropertyChangedEvent & PropertyCha...
)

Called when a property on this object has been modified externally

Classes

Constants

Name

Description

MIN_TICK_TIME

Minimum delta time considered when ticking.

See Also

References

Module

Engine

Header

Runtime/Engine/Classes/Components/InterpToMovementComponent.h