# Auto adjustment of orientation of a 3D model as it flies

**URL:** <https://community.cesium.com/t/auto-adjustment-of-orientation-of-a-3d-model-as-it-flies/4372>\
**Category:** CesiumJS\
**Created:** [July 14, 2016, 7:41pm UTC](https://community.cesium.com/t/auto-adjustment-of-orientation-of-a-3d-model-as-it-flies/4372 "2016-07-14T19:41:56Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Jake\_Priddy](https://avatars.discourse-cdn.com/v4/letter/j/b5ac83/32.png) [@Jake\_Priddy](https://community.cesium.com/u/Jake_Priddy)\
**Post date:** [July 14, 2016, 7:41pm UTC](https://community.cesium.com/t/auto-adjustment-of-orientation-of-a-3d-model-as-it-flies/4372/1 "2016-07-14T19:41:56Z")

</div>

// Add button to fire AH64

Sandcastle.addToolbarButton(‘Fire AGM-114’, function() {

//Seed the random number generator for repeatable results.

Cesium.Math.setRandomNumberSeed(0);

promise.then(function(dataSource) {

```
  viewer.dataSources.add(dataSource);

  //Load cmzl file

  var promise = Cesium.CzmlDataSource.load('/sjc/agmLaunch.czml');

  promise.then(function(dataSource) {

      viewer.dataSources.add(dataSource)});

  //Get the array of entities

  var entities = dataSource.entities.add({

    orientation : new Cesium.VelocityOrientationProperty(position)

  });

})

```

});

``

I have been building an app that shows a visual depiction of the flight path of a missile. I am almost done with my demo and have properly oriented the aircraft but I don’t understand how to change orientation of the missile as it flies. I saw some other people have said to use the Cesium.VelocityOrientationProperty function to modify the czml file my missile is in on the client side, this is what I have so far.
