Place scs file in existing viewer scene with position, rotation and scale

Do someone know if it is possible to place a scs file in an existing model scene and add position, rotation and scale?
Let’s say that you are viewing a building. And want to add a glb representation of some asset like a chair. Can that be place where it belongs using for example the loadSubtreeFromScsFile function?

Hello @EspenMarthini

One of the parameters for the method loadSubtreeFromScsFile is a LoadSubtreeConfig object – which in turn has a property called additionalMatrix. Essentially you can create your own transformation matrix (position, rotation, scale) to place the SCS file being loaded into the scene.

As noted in our docs on loading subtrees,

The newly attached model inherits the net matrix of its parent node, meaning that its 3D location in relation to the rest of the model will depend on the node hierarchy above it.

So you will need to factor other transformation matrices, if any, above the model that you are loading.


1 Like