# flies along a set of selected path points

**URL:** <https://community.cesium.com/t/flies-along-a-set-of-selected-path-points/39746>\
**Category:** CesiumJS\
**Created:** [April 2, 2025, 11:39am UTC](https://community.cesium.com/t/flies-along-a-set-of-selected-path-points/39746 "2025-04-02T11:39:32Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![HelloKitty\_Yards](https://sea2.discourse-cdn.com/cesium/user_avatar/community.cesium.com/hellokitty_yards/32/26344_2.png) [@HelloKitty\_Yards](https://community.cesium.com/u/HelloKitty_Yards)\
**Post date:** [April 2, 2025, 11:39am UTC](https://community.cesium.com/t/flies-along-a-set-of-selected-path-points/39746/1 "2025-04-02T11:39:32Z")

</div>

**Hello, I want to use Cesium to implement a 3D globe where a model flies along a set of selected path points. How can I achieve this?**

---

<div class="post-metadata">

**Author:** ![johnvheldev428](https://sea2.discourse-cdn.com/cesium/user_avatar/community.cesium.com/johnvheldev428/32/28506_2.png) [@johnvheldev428](https://community.cesium.com/u/johnvheldev428)\
**Post date:** [April 2, 2025, 8:13pm UTC](https://community.cesium.com/t/flies-along-a-set-of-selected-path-points/39746/2 "2025-04-02T20:13:41Z")

</div>

Hi @HelloKitty_Yards  
I hope this code can help you.

```auto
var viewer = new Cesium.Viewer("cesiumContainer", {
  shouldAnimate: true,
});

var start = Cesium.JulianDate.fromDate(new Date(2025, 3, 2, 12));
var stop = Cesium.JulianDate.addSeconds(start, 300, new Cesium.JulianDate());

viewer.clock.startTime = start.clone();
viewer.clock.stopTime = stop.clone();
viewer.clock.currentTime = start.clone();
viewer.clock.clockRange = Cesium.ClockRange.LOOP_STOP;
viewer.clock.multiplier = 1;

var position = new Cesium.SampledPositionProperty();

var pathPoints = [
  { time: 0, position: Cesium.Cartesian3.fromDegrees(-75.59777, 40.03883, 1000) },
  { time: 60, position: Cesium.Cartesian3.fromDegrees(-80.50, 35.14, 5000) },
  { time: 120, position: Cesium.Cartesian3.fromDegrees(-85.12, 30.12, 10000) },
  { time: 180, position: Cesium.Cartesian3.fromDegrees(-90.50, 25.32, 15000) },
  { time: 240, position: Cesium.Cartesian3.fromDegrees(-95.00, 20.00, 20000) },
  { time: 300, position: Cesium.Cartesian3.fromDegrees(-100.00, 15.00, 25000) },
];

pathPoints.forEach(function (point) {
  var time = Cesium.JulianDate.addSeconds(start, point.time, new Cesium.JulianDate());
  position.addSample(time, point.position);
});

var entity = viewer.entities.add({
  availability: new Cesium.TimeIntervalCollection([
    new Cesium.TimeInterval({ start: start, stop: stop }),
  ]),
  position: position,
  orientation: new Cesium.VelocityOrientationProperty(position),
  model: {
    uri: "../SampleData/models/CesiumAir/Cesium_Air.glb", 
    minimumPixelSize: 64,
  },
  path: {
    resolution: 1,
    material: new Cesium.PolylineGlowMaterialProperty({
      glowPower: 0.1,
      color: Cesium.Color.YELLOW,
    }),
    width: 10,
  },
});

viewer.trackedEntity = entity;

```

[Sandcastle here:](https://sandcastle.cesium.com/#c=lVVdb9owFP0rFk9BykwSYFBKq1WsmjYxEY1q0zSqyiQGrDl25DgwVvHfd22HQFs6lZfEsc89Pvcza6LQmtENVegKCbpBI1qwMsPf7Z43ayT2eySFJkxQNWv46HEmECpWsuTpjWAZ0XSAtCqpPxO75uVMzMQaWAtNlAbSivBLyRkRHwGMF0pmZuGZ++wiCqKuj9o+inwURk1D4ihkfpKBpOmUJlKkhWevAdsg8I/1H8Bes9JkPcIJl8lvbK3uWEaB3q7NvgDs5QugzGuczF+DJaVSVLyJ0T6/EbGkB9dG9R4eTybxw/RuEj+3y0quWc6ZzVRYhzmXBdNMiqfpm5Is5zSNq8NYyZwqvfUO6cmJXsWSCV2A5S+T0UekQf4AQSD3pINaIDgEKyLaLnt0qSgtvHe9Lu5e9Ho9H3UCHLT7fchhGARBE+38Y87355D2A9wFfLuLw46PuifowugsPiCKTInYl5H3krB/DuGFExh1cdsQnlIYdc4i7GJTv1FQvU4Q2gJ/MyE4aanCivgg8d5WwCH7eCHVLUlW3qIUiS0kLzcHTdfmplS0q+q3tKE1xcbg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