| 91 | } |
| 92 | |
| 93 | void 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 | |
| 131 | void AMjKeyframeCameraActor::UpdateCameraTransform() |
| 132 | { |
nothing calls this directly
no outgoing calls
no test coverage detected