In the callback property, the same value is obtained using VelocityOrientationProperty(). getValue

In the callback property, the same value is obtained using VelocityOrientationProperty(). getValue, but when VelocityOrientationProperty() is used alone, it changes from time to time。

I want to rotate a model first, and then let it apply VelocityOrientationProperty

function getori(time, result) {

  let r = new Cesium.HeadingPitchRoll(
    Cesium.Math.toRadians(0),
    Cesium.Math.toRadians(0),
    Cesium.Math.toRadians(180)
  );
  var r1 = new Cesium.Quaternion.fromHeadingPitchRoll(r)
  var rwx = new Cesium.VelocityOrientationProperty(computeFlight(data_wx, 1)).getValue(viewer.clock.currentTime)
  var rwx1 = new Cesium.HeadingPitchRoll.fromQuaternion(rwx)
  let hpr = new Cesium.HeadingPitchRoll(
    rwx1.heading,
    rwx1.pitch,
    r.roll + rwx1.roll,
  )
  return rwx
}

The return value is rwx, so I found that rwx is a fixed value.

Hello there,

To confirm, you’re noticing that the orientation does not change when you are using getori as the parameter for a CallbackProperty, correct?

Yes, I assigned this callback function to a model, and then passed the
model. orientation. getValue (time) can get the correct value.

I’m not sure if I can replicate the issue. Here’s a sandcastle using this getori function as the callback property. Did you make sure to include false as the second parameter to the CallbackProperty?

Sorry, maybe I made a mistake. Thank you very much for your help. If I find the same problem later, I will contact you again!