Skip to content
Advertisement

ARCore – How to set default scale for a Transformable node?

I am using Transformable node and able to set minimum and maximum scale values. But I am using a model whose default size is much bigger so I have to use gestures to make it small.

How is it possible to set default scale value of a model / Transformable node?

Advertisement

Answer

i think you can use TransformableNode’s setLocalScale method before it set a actual Renderable. like the code below

TransformableNode andy = new TransformableNode(arFragment.getTransformationSystem());
      andy.setLocalScale(new Vector3(0.1f, 0.1f, 0.1f));
      andy.setParent(anchorNode);
      andy.setRenderable(andyRenderable);
      andy.select();

I used 0.1f for x, y, z value, then it looks better

User contributions licensed under: CC BY-SA
5 People found this is helpful
Advertisement