# FSequencer OnJumpToEnd Frame Offset

**URL:** <https://forums.unrealengine.com/t/fsequencer-onjumptoend-frame-offset/490613>\
**Category:** Cinematics & Media\
**Tags:** bug, frames, offset, unreal-engine, question, CPP\
**Created:** [November 4, 2021, 11:37pm UTC](https://forums.unrealengine.com/t/fsequencer-onjumptoend-frame-offset/490613 "2021-11-04T23:37:04Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Kyle\_Norton](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Kyle\_Norton](https://forums.unrealengine.com/u/Kyle_Norton)\
**Post date:** [November 4, 2021, 11:37pm UTC](https://forums.unrealengine.com/t/fsequencer-onjumptoend-frame-offset/490613/1 "2021-11-04T23:37:04Z")

</div>

Hi,  
I’m just curious as for the reasoning with this source code dealing with “Jump To End” in Sequencer.  
Why does UE want to calculate a one frame offset from the end when i jump to the end it seems counterintuitive.  
For example if i have a 150 frame sequence and press ‘Jump To End’ why does it take me to frame 149 and not frame 150?

```
    FReply FSequencer::OnJumpToEnd()
    {
    	SetPlaybackStatus(EMovieScenePlayerStatus::Stepping);
    	const bool bInsetDisplayFrame = ScrubStyle == ESequencerScrubberStyle::FrameBlock && Settings->GetSnapPlayTimeToInterval() && Settings->GetIsSnapEnabled();
    
    	FFrameRate LocalResolution = GetFocusedTickResolution();
    	FFrameRate DisplayRate = GetFocusedDisplayRate();
    
    	// Calculate an offset from the end to go to. If they have snapping on (and the scrub style is a block) the last valid frame is represented as one
    	// whole display rate frame before the end, otherwise we just subtract a single frame which matches the behavior of hitting play and letting it run to the end.
    	FFrameTime OneFrame = bInsetDisplayFrame ? FFrameRate::TransformTime(FFrameTime(1), DisplayRate, LocalResolution) : FFrameTime(1);
    	FFrameTime NewTime = UE::MovieScene::DiscreteExclusiveUpper(GetTimeBounds()) - OneFrame;
    
    	SetLocalTime(NewTime, ESnapTimeMode::STM_None);
    	return FReply::Handled();
    }

```

Thanks
