Applying a transform to the top node of a model

I have a model that, as created, has its “forward” pointing down its x axis. I would like it to be pointing down its y axis so that in an ENU coordinate system, it will automatically have its forward pointing north (positive y axis) with a heading of 0 radians.

My best idea right now is to add a “nodeTransformation” on the model’s top node to rotate it 90 degrees around the z axis. However, creating a nodeTransformation requires knowledge of the top node’s name (I need to do this generically for multiple models, so hard-coding the name isn’t an option for me).

So, my question is twofold:

  1. Can anyone think of a better way to do what I need to do?
  2. If not, do you know of a way that I can get the model’s top-level node’s name so I can specify the nodeTransformation?

Any thoughts?

Hello,

I’m not sure if you’re able to do this, but the best solution would be to re-orient your model to the correct axis and re-convert it to glTF so you don’t have to do any workaround.

Other than that, you could either always add 90 degrees to the heading, or do the approach you suggested. I can’t think of anything we have built in to handle this case.

Best,

Hannah

Okay, thanks!