Scaling Single Meshes in Scene Doesn't Work Properly

I am working with the following playground example but can’t scale everything. Several topics discuss scaling and issues like the following: Imported mesh scaling not working

Below is the playground scene:

there are 3 meshes: GPmesh, GPmeshi and GDmesh.

I used the following format after each creation line but the scaled result is not like the original:

        GPmesh.scaling = new BABYLON.Vector3(10, 10, 10);  // WINFIELD
        GPmeshi.scaling = new BABYLON.Vector3(10, 10, 10);  // WINFIELD
        GDmesh.scaling = new BABYLON.Vector3(10, 10, 10);  // WINFIELD

The ‘radius’ variable in createGDMM doesn’t seem to work as indicated.

Any solutions for scaling this scene by 10 in 3 dimensions?

I’m not sure to understand.
I tweaked the PG and changed the radius parameter and the mesh.scaling value. I get different rendering corresponding to the change I’m doing.

My guess is you did not do a mesh.computeWorldMatrix(true); call to update the bounding box after the scaling change. Let me know if I missied something.

Hi thanks for responding. Yes, using the *.scaling and *.computeWorldMatrix code, the scene changes. However, it’s not the same. To show the difference, ZOOM ‘inside’ the sphere.

In the original scene the inside looks one way, after scaling it looks entirely different inside.

Issue may be with the size of the ‘lines’ used to draw the meshes but something isn’t scaling when changing

Correct, you’ll have to change
mesh.edgesWidth = 10; as well!

1 Like

Ha ha! Great minds think alike! :slight_smile: I was checking that right after I posted.

Turns out, to get the same effect I had to multiply the 'mesh.edgesWidth by 10 and set it to “100”.
→ mesh.edgesWidth = 100;

Now it looks similar inside after scaling. Thanks for your help.