Are you using CZML, or are you creating primitives directly?
For CZML, check out simple.czml in the Apps/CesiumViewer/Gallery directory. It’s as easy as adding the referenceFrame property to the position data:
“position”:{
“interpolationAlgorithm”:“LAGRANGE”,
“interpolationDegree”:5,
“referenceFrame”:“INERTIAL”,
“epoch”:“2012-03-15T10:00:00Z”,
“cartesian”:[
0.0,4650397.56551457,-3390535.52275848,-4087729.48877329,
…]
For custom primitives, you simple use ECI coordinates when calling SetPositions but then also need to set the modelMatrix each frame. To do that you would have code like the following (this is taken directly from DynamicPathVisualizer.js in DynamicScene)
PolylineUpdater.prototype.update = function(time) {
if (this._referenceFrame === ReferenceFrame.INERTIAL) {
var toFixed = Transforms.computeIcrfToFixedMatrix(time, toFixedScratch);
if (typeof toFixed === ‘undefined’) {
toFixed = Transforms.computeTemeToPseudoFixedMatrix(time, toFixedScratch);
}
Matrix4.fromRotationTranslation(toFixed, Cartesian3.ZERO, this._polylineCollection.modelMatrix);
}
};