How can I resize of a node?

  1. A building model is loaded in webviewer.
  2. I made a ball by FBX.
  3. I attached the ball to root(getAbsoluteRootNode()) by loadSubtreeFromModel() function.

Question) How can I resize the ball size(width, height or radius)?

Hi,

in general you would set a matrix with the appropriate scale component to change the size of an object. You just have to make sure to calculate the correct center point of the object first and take this into account which involves a bit of matrix math.

See below for an example that scales a selected node by a factor of 2:

https://3dsandbox.techsoft3d.com/?snippet=4R0PWeEKpILgqjrRkL6e5Q&autorun=true

2 Likes