File tree 1 file changed +8
-2
lines changed
1 file changed +8
-2
lines changed Original file line number Diff line number Diff line change 1599
1599
rollValue = 0 ;
1600
1600
}
1601
1601
1602
+ // by default in glTF 2.0 +Z faces forward, while earlier version of Cesium uses +X
1603
+ // https://github.com/AnalyticalGraphicsInc/cesium/pull/6632
1604
+ headingValue = headingValue + 90 ;
1605
+
1602
1606
var heading = Cesium . Math . toRadians ( headingValue ) ;
1603
1607
var pitch = Cesium . Math . toRadians ( tiltValue ) ;
1604
1608
var roll = Cesium . Math . toRadians ( rollValue ) ;
1605
1609
1606
1610
// Backward compatible....
1607
1611
var gltfVersion = CitydbUtil . parse_query_string ( 'gltf_version' , window . location . href ) ;
1608
1612
if ( gltfVersion == '0.8' ) {
1609
- var heading = Cesium . Math . toRadians ( headingValue - 180 ) ;
1610
- var pitch = Cesium . Math . toRadians ( 180 ) ;
1613
+ heading = Cesium . Math . toRadians ( headingValue - 180 ) ;
1614
+ pitch = Cesium . Math . toRadians ( 180 ) ;
1615
+ } else if ( gltfVersion == '1.0' ) {
1616
+ heading = Cesium . Math . toRadians ( headingValue - 90 ) ;
1611
1617
}
1612
1618
1613
1619
var hpr = new Cesium . HeadingPitchRoll ( heading , pitch , roll ) ;
You can’t perform that action at this time.
0 commit comments