I’ve tried messing with it using the console, but I can’t seem alter rotations though. I typed this into the console
var cr=viewer.scene.camera.right;
var cd=viewer.scene.camera.direction;
var cu=viewer.scene.camera.up;
var cp=viewer.scene.camera.position;
I then tried both of the following with to no avail (move house to camera)
tileset.modelMatrix={0: cr.x, 1: cr.y, 2: cr.z, 3: 0, 4: cd.x, 5: cd.y, 6: cd.z, 7: 0, 8: cu.x, 9: cu.y, 10: cu.z, 11: 0, 12: cp.x, 13: cp.y, 14: cp.z, 15: 1};
tileset._modelMatrix={0: cr.x, 1: cr.y, 2: cr.z, 3: 0, 4: cd.x, 5: cd.y, 6: cd.z, 7: 0, 8: cu.x, 9: cu.y, 10: cu.z, 11: 0, 12: cp.x, 13: cp.y, 14: cp.z, 15: 1};
Odd thing is you can move it around a bit, this moves it up a bit:
tileset.modelMatrix={0: 1, 1: 0, 2: 0, 3: 0, 4: 0, 5: 1, 6: 0, 7: 0, 8: 0, 9: 0, 10: 1, 11: 0, 12: 0, 13: 0, 14: 20, 15: 1};
Then this moves it up and right a bit:
tileset.modelMatrix={0: 1, 1: 0, 2: 0, 3: 0, 4: 0, 5: 1, 6: 0, 7: 0, 8: 0, 9: 0, 10: 1, 11: 0, 12: 40, 13: 0, 14: 20, 15: 1};
I’ve tried different rotations, but the house wouldn’t appear
//rotate 90deg CW around z
tileset.modelMatrix={0: 0, 1: -1, 2: 0, 3: 0, 4: 1, 5: 0, 6: 0, 7: 0, 8: 0, 9: 0, 10: 1, 11: 0, 12: 0, 13: 0, 14: 0, 15: 1};
//rotate 90deg CCW around z
tileset.modelMatrix={0: 0, 1: 1, 2: 0, 3: 0, 4: -1, 5: 0, 6: 0, 7: 0, 8: 0, 9: 0, 10: 1, 11: 0, 12: 0, 13: 0, 14: 20, 15: 1};
That transform in the JSON is entered to _clippingPlanesOriginMatrix
Not sure if that’s causing the house to disappear on rotations.
I’ve even tried
tileset.root.children[0]._tileset.modelMatrix={0: cr.x, 1: cr.y, 2: cr.z, 3: 0, 4: cd.x, 5: cd.y, 6: cd.z, 7: 0, 8: cu.x, 9: cu.y, 10: cu.z, 11: 0, 12: cp.x, 13: cp.y, 14: cp.z, 15: 1};
tileset.root.children[0]._tileset._modelMatrix={0: cr.x, 1: cr.y, 2: cr.z, 3: 0, 4: cd.x, 5: cd.y, 6: cd.z, 7: 0, 8: cu.x, 9: cu.y, 10: cu.z, 11: 0, 12: cp.x, 13: cp.y, 14: cp.z, 15: 1};