MCPcopy Create free account
hub / github.com/URLab-Sim/UnrealRoboticsLab / Tick

Method Tick

Source/URLab/Private/Cinematics/MjKeyframeCameraActor.cpp:93–129  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

91}
92
93void AMjKeyframeCameraActor::Tick(float DeltaTime)
94{
95 Super::Tick(DeltaTime);
96
97 if (bDelayPending)
98 {
99 DelayTimer -= DeltaTime;
100 if (DelayTimer <= 0.0f)
101 {
102 bDelayPending = false;
103 Play();
104 }
105 return;
106 }
107
108 if (!bIsPlaying || Waypoints.Num() < 2)
109 return;
110
111 PlaybackTime += DeltaTime;
112
113 float MaxTime = Waypoints.Last().time;
114 if (PlaybackTime >= MaxTime)
115 {
116 if (bLoop)
117 {
118 PlaybackTime = FMath::Fmod(PlaybackTime, MaxTime);
119 }
120 else
121 {
122 PlaybackTime = MaxTime;
123 bIsPlaying = false;
124 UE_LOG(LogURLab, Log, TEXT("MjKeyframeCamera: Playback complete"));
125 }
126 }
127
128 UpdateCameraTransform();
129}
130
131void AMjKeyframeCameraActor::UpdateCameraTransform()
132{

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected