Why does the rotation, translation, scaling transformation of the model have no effect?

Why does the rotation, translation, scaling transformation of the model have no effect? there’s error in scaling

As the error states scaling is not a function

model.scaling = new BABYLON.Vector3(x, y, z)

Also a scaling of 0 on any axis reduces your model to 0 size.

1 Like

Although the error was resolved, they still didn’t work

Appears to work if you change the scale to something non zero.

1 Like

The model’s transform isn’t being applied because you don’t apply its world matrix to the vertex position when setting gl_Position. For example here I added the uniform “world” to the shader and multiple the position by it (and also added that uniform to the shader options as required).

Also you can use worldViewProjection instead if you want to also apply the camera transforms too, like below. Prob this is what you want but above shows what transforming by the world matrix does. :slight_smile:

1 Like