How can I center my Node containing a ModelRenderable? I'm using a SceneView because I don't want AR.
<com.google.ar.sceneform.SceneView
android:id="@+id/popup_overview_model_view"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="#FFFFFF"
android:visibility="visible"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
private void addModelToViewer(ModelRenderable model) {
if (popupOverviewSceneView != null) {
Node modelNode = new Node();
modelNode.setRenderable((Renderable) model);
modelNode.setParent(popupOverviewSceneView.getScene());
modelNode.setLocalPosition(new Vector3(0f, 0f, 0f));
modelNode.setWorldScale(new Vector3(1f, 1f, 1f));
popupOverviewSceneView.getScene().addChild(modelNode);
}
}
As you can see the 3D model of the car is way too big and not centered. There's multiple 3D models with different sizes. How can I center the 3D model?