Open abdelrahman-abied opened 1 year ago
ARNodes have a scale variable aka:
ARNode pointNode = ARNode( type: NodeType.fileSystemAppFolderGLTF2, uri: "point.gltf", scale: Vector3(0.1, 0.1, 1.1), );
This would scale the "point.gltf" file to 10% of the original size in the x, and y directions. And the z direction would be 10% bigger.
ARNodes have a scale variable aka:
ARNode pointNode = ARNode( type: NodeType.fileSystemAppFolderGLTF2, uri: "point.gltf", scale: Vector3(0.1, 0.1, 1.1), );
This would scale the "point.gltf" file to 10% of the original size in the x, and y directions. And the z direction would be 10% bigger.
i am tried to do that but it's not resize creaded node
Ah, if you try to update the size of an existing node nothing will happen, what I do is: remove the node from the object manager, adjust the size of the node, Then add the node back to the object manager. Hopefully that works for you but it would be nice if changing the size of a node updated automatically.
remove the node from the object manager,
please add code sample for this and is the node will be in the same position
Found a much better way to just directly change the scale, or any other value, without having to remove the node. You simply need to set the nodes transform.
to set up the node:
ARNode node = ARNode(type: NodeType.fileSystemAppFolderGLTF2, uri: "point.gltf");
to set the scale to 10% of its original size:
node.transform = Matrix4.identity()..scale(Vector3(0.1, 0.1, 0.1));
to change the scale to 10% of its current size:
node.transform = Matrix4.identity()..scale(node.scale*0.1);
thanks for your answer but after resize node every time node back to the first position in the scene
Hi, @abdelrahman-abied. Could you find any solution? If yes, please can you share it here.
Thanks in advance.
did you find any solution ?