subtr-actor 1.1.0

Rocket League replay transformer
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
use super::*;

fn player(id: u64) -> PlayerId {
    boxcars::RemoteId::Steam(id)
}

fn frame_at(time: f32) -> FrameInfo {
    FrameInfo {
        frame_number: (time * 10.0).round() as usize,
        time,
        dt: 0.1,
        seconds_remaining: None,
    }
}

fn touch_at(player_id: &PlayerId, time: f32) -> TouchEvent {
    TouchEvent {
        touch_id: None,
        time,
        frame: (time * 10.0).round() as usize,
        team_is_team_0: true,
        player: Some(player_id.clone()),
        player_position: None,
        closest_approach_distance: None,
        contact_local_ball_position: None,
        contact_local_hitbox_point: None,
        contact_world_hitbox_point: None,
        dodge_contact: false,
    }
}

fn stat_event(player_id: &PlayerId, time: f32, kind: PlayerStatEventKind) -> PlayerStatEvent {
    PlayerStatEvent {
        time,
        frame: (time * 10.0).round() as usize,
        player: player_id.clone(),
        player_position: None,
        is_team_0: true,
        kind,
        shot: None,
    }
}

fn neutral_ctx() -> TouchIntentionFrameContext<'static> {
    TouchIntentionFrameContext {
        ball_position: Some(glam::Vec3::new(0.0, 0.0, BALL_RADIUS_Z)),
        ball_velocity: Some(glam::Vec3::ZERO),
        previous_ball_position: None,
        previous_ball_velocity: None,
        teammate_positions: &[],
        contested: false,
    }
}

#[test]
fn replay_reported_save_outranks_contested_challenge() {
    let player_id = player(1);
    let mut classifier = TouchIntentionClassifier::default();
    classifier.begin_frame(
        &frame_at(10.0),
        &[stat_event(&player_id, 10.0, PlayerStatEventKind::Save)],
    );

    let resolution = classifier.classify(
        &touch_at(&player_id, 10.0),
        &player_id,
        &TouchIntentionFrameContext {
            contested: true,
            ..neutral_ctx()
        },
    );

    assert_eq!(resolution.action, Some(TouchAction::Save));
    assert!(resolution.contested);
}

#[test]
fn stat_event_for_other_player_does_not_match() {
    let toucher = player(1);
    let other = player(2);
    let mut classifier = TouchIntentionClassifier::default();
    classifier.begin_frame(
        &frame_at(10.0),
        &[stat_event(&other, 10.0, PlayerStatEventKind::Shot)],
    );

    let resolution = classifier.classify(&touch_at(&toucher, 10.0), &toucher, &neutral_ctx());

    assert_eq!(resolution.action, None);
}

#[test]
fn stat_event_outside_match_window_does_not_match() {
    let player_id = player(1);
    let mut classifier = TouchIntentionClassifier::default();
    classifier.begin_frame(
        &frame_at(10.0),
        &[stat_event(&player_id, 10.0, PlayerStatEventKind::Shot)],
    );

    let resolution = classifier.classify(&touch_at(&player_id, 11.0), &player_id, &neutral_ctx());

    assert_eq!(resolution.action, None);
}

#[test]
fn contested_touch_keeps_its_geometric_action() {
    // Contested is an independent flag, not an action: a contested touch that is
    // also a geometric shot stays a shot and is additionally marked contested,
    // so neither piece of information is lost.
    let player_id = player(1);
    let mut classifier = TouchIntentionClassifier::default();

    let resolution = classifier.classify(
        &touch_at(&player_id, 1.0),
        &player_id,
        &TouchIntentionFrameContext {
            ball_position: Some(glam::Vec3::new(0.0, 4000.0, BALL_RADIUS_Z)),
            ball_velocity: Some(glam::Vec3::new(0.0, 2000.0, 0.0)),
            contested: true,
            ..neutral_ctx()
        },
    );

    assert_eq!(resolution.action, Some(TouchAction::Shot));
    assert!(resolution.contested);
}

#[test]
fn fast_touch_toward_goal_mouth_classifies_as_shot() {
    let player_id = player(1);
    let mut classifier = TouchIntentionClassifier::default();

    let resolution = classifier.classify(
        &touch_at(&player_id, 1.0),
        &player_id,
        &TouchIntentionFrameContext {
            ball_position: Some(glam::Vec3::new(0.0, 4000.0, BALL_RADIUS_Z)),
            ball_velocity: Some(glam::Vec3::new(0.0, 2000.0, 0.0)),
            ..neutral_ctx()
        },
    );

    assert_eq!(resolution.action, Some(TouchAction::Shot));
}

#[test]
fn upward_arced_shot_into_net_classifies_as_shot() {
    // A shot hit hard with significant upward velocity: a straight-line
    // projection sails it well over the crossbar (z ~1500), but gravity arcs it
    // back down into the goal mouth (z ~160). This mirrors a dribble-flick that
    // scores along an obvious arc, which used to read as no action.
    let player_id = player(1);
    let mut classifier = TouchIntentionClassifier::default();

    let resolution = classifier.classify(
        &touch_at(&player_id, 1.0),
        &player_id,
        &TouchIntentionFrameContext {
            ball_position: Some(glam::Vec3::new(0.0, 0.0, BALL_RADIUS_Z)),
            ball_velocity: Some(glam::Vec3::new(0.0, 2500.0, 700.0)),
            ..neutral_ctx()
        },
    );

    assert_eq!(resolution.action, Some(TouchAction::Shot));
}

#[test]
fn shot_sailing_over_the_crossbar_is_not_a_shot() {
    // Even with gravity, a ball rocketing upward is still well above the
    // crossbar when it reaches the goal line, so it must not read as a shot.
    let player_id = player(1);
    let mut classifier = TouchIntentionClassifier::default();

    let resolution = classifier.classify(
        &touch_at(&player_id, 1.0),
        &player_id,
        &TouchIntentionFrameContext {
            ball_position: Some(glam::Vec3::new(0.0, 4000.0, BALL_RADIUS_Z)),
            ball_velocity: Some(glam::Vec3::new(0.0, 2500.0, 2000.0)),
            ..neutral_ctx()
        },
    );

    assert_ne!(resolution.action, Some(TouchAction::Shot));
}

#[test]
fn fast_touch_wide_of_goal_mouth_is_a_boom_not_a_shot() {
    // A hard hit pointed downfield but wide of the goal mouth is not a shot; it
    // reads as a boom (a big hit into space), not a fall-through neutral.
    let player_id = player(1);
    let mut classifier = TouchIntentionClassifier::default();

    let resolution = classifier.classify(
        &touch_at(&player_id, 1.0),
        &player_id,
        &TouchIntentionFrameContext {
            ball_position: Some(glam::Vec3::new(0.0, 4000.0, BALL_RADIUS_Z)),
            ball_velocity: Some(glam::Vec3::new(3000.0, 2000.0, 0.0)),
            ..neutral_ctx()
        },
    );

    assert_eq!(resolution.action, Some(TouchAction::Boom));
}

#[test]
fn slow_roll_toward_goal_is_not_a_shot() {
    let player_id = player(1);
    let mut classifier = TouchIntentionClassifier::default();

    let resolution = classifier.classify(
        &touch_at(&player_id, 1.0),
        &player_id,
        &TouchIntentionFrameContext {
            ball_position: Some(glam::Vec3::new(0.0, 4000.0, BALL_RADIUS_Z)),
            ball_velocity: Some(glam::Vec3::new(0.0, 900.0, 0.0)),
            ..neutral_ctx()
        },
    );

    assert_eq!(resolution.action, None);
}

#[test]
fn redirect_of_ball_headed_into_own_goal_is_a_save() {
    let player_id = player(1);
    let mut classifier = TouchIntentionClassifier::default();

    let resolution = classifier.classify(
        &touch_at(&player_id, 1.0),
        &player_id,
        &TouchIntentionFrameContext {
            ball_position: Some(glam::Vec3::new(0.0, -4200.0, BALL_RADIUS_Z)),
            ball_velocity: Some(glam::Vec3::new(800.0, 0.0, 0.0)),
            previous_ball_position: Some(glam::Vec3::new(0.0, -4000.0, BALL_RADIUS_Z)),
            previous_ball_velocity: Some(glam::Vec3::new(0.0, -2000.0, 0.0)),
            ..neutral_ctx()
        },
    );

    assert_eq!(resolution.action, Some(TouchAction::Save));
}

#[test]
fn fast_touch_out_of_defensive_third_is_a_clear() {
    let player_id = player(1);
    let mut classifier = TouchIntentionClassifier::default();

    let resolution = classifier.classify(
        &touch_at(&player_id, 1.0),
        &player_id,
        &TouchIntentionFrameContext {
            ball_position: Some(glam::Vec3::new(0.0, -4000.0, BALL_RADIUS_Z)),
            ball_velocity: Some(glam::Vec3::new(1400.0, 800.0, 0.0)),
            ..neutral_ctx()
        },
    );

    assert_eq!(resolution.action, Some(TouchAction::Clear));
}

#[test]
fn slow_touch_in_defensive_third_is_not_a_clear() {
    let player_id = player(1);
    let mut classifier = TouchIntentionClassifier::default();

    let resolution = classifier.classify(
        &touch_at(&player_id, 1.0),
        &player_id,
        &TouchIntentionFrameContext {
            ball_position: Some(glam::Vec3::new(0.0, -4000.0, BALL_RADIUS_Z)),
            ball_velocity: Some(glam::Vec3::new(300.0, 200.0, 0.0)),
            ..neutral_ctx()
        },
    );

    assert_eq!(resolution.action, None);
}

#[test]
fn hard_hit_downfield_into_space_is_a_boom() {
    // Midfield, no teammate to receive, not on goal, not a defensive clear: a
    // fast hit pointed at the opponent half reads as a boom.
    let player_id = player(1);
    let mut classifier = TouchIntentionClassifier::default();

    let resolution = classifier.classify(
        &touch_at(&player_id, 1.0),
        &player_id,
        &TouchIntentionFrameContext {
            ball_position: Some(glam::Vec3::new(0.0, 0.0, BALL_RADIUS_Z)),
            ball_velocity: Some(glam::Vec3::new(0.0, 2000.0, 0.0)),
            ..neutral_ctx()
        },
    );

    assert_eq!(resolution.action, Some(TouchAction::Boom));
}

#[test]
fn soft_touch_downfield_is_not_a_boom() {
    let player_id = player(1);
    let mut classifier = TouchIntentionClassifier::default();

    let resolution = classifier.classify(
        &touch_at(&player_id, 1.0),
        &player_id,
        &TouchIntentionFrameContext {
            ball_position: Some(glam::Vec3::new(0.0, 0.0, BALL_RADIUS_Z)),
            ball_velocity: Some(glam::Vec3::new(0.0, 800.0, 0.0)),
            ..neutral_ctx()
        },
    );

    assert_eq!(resolution.action, None);
}

#[test]
fn touch_leading_a_teammate_is_a_pass() {
    let player_id = player(1);
    let mut classifier = TouchIntentionClassifier::default();
    let teammates = [glam::Vec3::new(0.0, 1000.0, 17.0)];

    let resolution = classifier.classify(
        &touch_at(&player_id, 1.0),
        &player_id,
        &TouchIntentionFrameContext {
            ball_velocity: Some(glam::Vec3::new(0.0, 1000.0, 0.0)),
            teammate_positions: &teammates,
            ..neutral_ctx()
        },
    );

    assert_eq!(resolution.action, Some(TouchAction::Pass));
}

#[test]
fn touch_away_from_teammates_is_not_a_pass() {
    let player_id = player(1);
    let mut classifier = TouchIntentionClassifier::default();
    let teammates = [glam::Vec3::new(2000.0, -1000.0, 17.0)];

    let resolution = classifier.classify(
        &touch_at(&player_id, 1.0),
        &player_id,
        &TouchIntentionFrameContext {
            ball_velocity: Some(glam::Vec3::new(0.0, 1000.0, 0.0)),
            teammate_positions: &teammates,
            ..neutral_ctx()
        },
    );

    assert_eq!(resolution.action, None);
}

#[test]
fn first_touch_tracking_follows_reception_changes() {
    let first_player = player(1);
    let second_player = player(2);
    let mut classifier = TouchIntentionClassifier::default();

    let opening = classifier.classify(&touch_at(&first_player, 1.0), &first_player, &neutral_ctx());
    assert!(opening.first_touch);

    let continuation =
        classifier.classify(&touch_at(&first_player, 1.5), &first_player, &neutral_ctx());
    assert!(!continuation.first_touch);

    let interception = classifier.classify(
        &touch_at(&second_player, 1.6),
        &second_player,
        &neutral_ctx(),
    );
    assert!(interception.first_touch);

    let after_gap = classifier.classify(
        &touch_at(&second_player, 4.5),
        &second_player,
        &neutral_ctx(),
    );
    assert!(after_gap.first_touch);
}

#[test]
fn contested_interruption_does_not_break_a_reception() {
    let dribbler = player(1);
    let challenger = player(2);
    let mut classifier = TouchIntentionClassifier::default();

    let opening = classifier.classify(&touch_at(&dribbler, 1.0), &dribbler, &neutral_ctx());
    assert!(opening.first_touch);

    let contested_ctx = TouchIntentionFrameContext {
        contested: true,
        ..neutral_ctx()
    };
    let challenge = classifier.classify(&touch_at(&challenger, 1.5), &challenger, &contested_ctx);
    assert!(challenge.first_touch);
    assert!(challenge.contested);

    let recovery = classifier.classify(&touch_at(&dribbler, 2.0), &dribbler, &neutral_ctx());
    assert!(!recovery.first_touch);
}

#[test]
fn clean_touch_after_winning_a_contest_starts_a_new_reception() {
    let dribbler = player(1);
    let challenger = player(2);
    let mut classifier = TouchIntentionClassifier::default();

    classifier.classify(&touch_at(&dribbler, 1.0), &dribbler, &neutral_ctx());

    let contested_ctx = TouchIntentionFrameContext {
        contested: true,
        ..neutral_ctx()
    };
    classifier.classify(&touch_at(&challenger, 1.5), &challenger, &contested_ctx);

    let takeover = classifier.classify(&touch_at(&challenger, 2.0), &challenger, &neutral_ctx());
    assert!(takeover.first_touch);

    let follow_up = classifier.classify(&touch_at(&challenger, 2.4), &challenger, &neutral_ctx());
    assert!(!follow_up.first_touch);
}

#[test]
fn reset_starts_a_new_reception() {
    let player_id = player(1);
    let mut classifier = TouchIntentionClassifier::default();

    classifier.classify(&touch_at(&player_id, 1.0), &player_id, &neutral_ctx());
    classifier.reset();
    let resolution = classifier.classify(&touch_at(&player_id, 1.2), &player_id, &neutral_ctx());

    assert!(resolution.first_touch);
}

#[test]
fn follow_up_touch_by_same_player_confirms_control() {
    let player_id = player(1);
    let mut tracker = ControlFollowTracker::default();
    tracker.open(0, &player_id, 1.0);

    let resolution = tracker.observe_touch(&player_id, 1.8).unwrap();

    assert_eq!(
        resolution,
        PossessionResolution {
            touch_index: 0,
            possession: Some(Possession::Control),
        }
    );
}

#[test]
fn follow_up_after_ball_played_into_space_resolves_as_advance() {
    let player_id = player(1);
    let mut tracker = ControlFollowTracker::default();
    tracker.open(0, &player_id, 0.0);

    // The ball is knocked well clear of the toucher across the window before
    // they win it back: peak gap exceeds the advance threshold.
    for step in 1..=8 {
        let time = step as f32 * 0.1;
        tracker.advance(
            &frame_at(time),
            Some(glam::Vec3::new(0.0, time * 2000.0, BALL_RADIUS_Z)),
            Some(glam::Vec3::new(0.0, 2000.0, 0.0)),
            Some(glam::Vec3::ZERO),
            Some(glam::Vec3::ZERO),
        );
    }

    let resolution = tracker.observe_touch(&player_id, 0.9).unwrap();
    assert_eq!(
        resolution,
        PossessionResolution {
            touch_index: 0,
            possession: Some(Possession::Advance),
        }
    );
}

#[test]
fn late_follow_up_touch_does_not_confirm_control() {
    let player_id = player(1);
    let mut tracker = ControlFollowTracker::default();
    tracker.open(0, &player_id, 1.0);

    let resolution = tracker.observe_touch(&player_id, 3.0).unwrap();

    assert!(resolution.possession.is_none());
}

#[test]
fn staying_close_and_speed_matched_resolves_control_on_timeout() {
    let player_id = player(1);
    let mut tracker = ControlFollowTracker::default();
    tracker.open(0, &player_id, 0.0);

    for step in 1..=12 {
        let time = step as f32 * 0.1;
        let resolution = tracker.advance(
            &frame_at(time),
            Some(glam::Vec3::new(0.0, time * 300.0, BALL_RADIUS_Z)),
            Some(glam::Vec3::new(0.0, 300.0, 0.0)),
            Some(glam::Vec3::new(0.0, time * 300.0 - 100.0, 17.0)),
            Some(glam::Vec3::new(0.0, 300.0, 0.0)),
        );
        assert!(resolution.is_none());
    }

    let resolution = tracker
        .advance(&frame_at(1.3), None, None, None, None)
        .unwrap();
    assert_eq!(
        resolution,
        PossessionResolution {
            touch_index: 0,
            possession: Some(Possession::Control),
        }
    );
}

#[test]
fn ball_leaving_the_player_resolves_as_not_control() {
    let toucher = player(1);
    let stealer = player(2);
    let mut tracker = ControlFollowTracker::default();
    tracker.open(0, &toucher, 0.0);

    for step in 1..=5 {
        let time = step as f32 * 0.1;
        tracker.advance(
            &frame_at(time),
            Some(glam::Vec3::new(0.0, time * 2000.0, BALL_RADIUS_Z)),
            Some(glam::Vec3::new(0.0, 2000.0, 0.0)),
            Some(glam::Vec3::ZERO),
            Some(glam::Vec3::ZERO),
        );
    }

    let resolution = tracker.observe_touch(&stealer, 0.6).unwrap();
    assert_eq!(
        resolution,
        PossessionResolution {
            touch_index: 0,
            possession: None,
        }
    );
}

#[test]
fn window_cut_short_does_not_confirm_control() {
    let player_id = player(1);
    let mut tracker = ControlFollowTracker::default();
    tracker.open(0, &player_id, 0.0);

    tracker.advance(
        &frame_at(0.1),
        Some(glam::Vec3::new(0.0, 0.0, BALL_RADIUS_Z)),
        Some(glam::Vec3::ZERO),
        Some(glam::Vec3::new(0.0, -100.0, 17.0)),
        Some(glam::Vec3::ZERO),
    );

    let resolution = tracker.flush().unwrap();
    assert!(resolution.possession.is_none());
}

fn goalward_sample() -> (glam::Vec3, glam::Vec3) {
    (
        glam::Vec3::new(0.0, 4000.0, BALL_RADIUS_Z),
        glam::Vec3::new(0.0, 2500.0, 0.0),
    )
}

#[test]
fn shot_projection_confirms_shot_from_settled_goalward_sample() {
    // is_team_0 touches default to attacking +y; a settled free-flight sample
    // headed hard into the opponent mouth resolves as a shot.
    let mut tracker = ShotProjectionTracker::default();
    tracker.open(0, true, 1.0);

    let (position, velocity) = goalward_sample();
    for time in [1.1, 1.2, 1.3] {
        assert!(
            tracker
                .advance(&frame_at(time), Some(position), Some(velocity))
                .is_none()
        );
    }

    // Next touch at 1.45; the guard ignores the last 0.12s, landing on the
    // 1.3 sample, which is still cleanly goalward.
    let resolution = tracker.observe_touch(1.45).unwrap();
    assert_eq!(resolution.touch_index, 0);
    assert!(resolution.is_shot);
}

#[test]
fn shot_projection_guard_skips_next_touch_contaminated_samples() {
    // Real free flight is goalward, but the frame right before the next touch is
    // already being dragged off by that touch's incoming impulse. The guard must
    // resolve from the earlier clean samples and still read a shot.
    let mut tracker = ShotProjectionTracker::default();
    tracker.open(0, true, 1.0);

    let (position, velocity) = goalward_sample();
    for time in [1.1, 1.2] {
        tracker.advance(&frame_at(time), Some(position), Some(velocity));
    }
    // Contaminated last frame: ball yanked sideways/backward by the next touch.
    tracker.advance(
        &frame_at(1.3),
        Some(glam::Vec3::new(0.0, 4200.0, BALL_RADIUS_Z)),
        Some(glam::Vec3::new(3000.0, -1500.0, 0.0)),
    );

    // Next touch at 1.32: without the guard this would read the 1.3 sample and
    // miss the shot; the guard falls back to the 1.2 sample.
    let resolution = tracker.observe_touch(1.32).unwrap();
    assert!(resolution.is_shot);
}

#[test]
fn shot_projection_ignores_sample_too_soon_after_touch() {
    // A sample within the settle window is the unreliable just-touched frame and
    // must not by itself confirm a shot.
    let mut tracker = ShotProjectionTracker::default();
    tracker.open(0, true, 1.0);

    let (position, velocity) = goalward_sample();
    tracker.advance(&frame_at(1.02), Some(position), Some(velocity));

    let resolution = tracker.observe_touch(1.2).unwrap();
    assert!(!resolution.is_shot);
}

#[test]
fn shot_projection_does_not_confirm_off_target_free_flight() {
    let mut tracker = ShotProjectionTracker::default();
    tracker.open(0, true, 1.0);

    // Settled, fast, but sailing well over the crossbar.
    tracker.advance(
        &frame_at(1.1),
        Some(glam::Vec3::new(0.0, 4000.0, BALL_RADIUS_Z)),
        Some(glam::Vec3::new(0.0, 2500.0, 2000.0)),
    );

    let resolution = tracker.flush().unwrap();
    assert!(!resolution.is_shot);
}