Material mapping texture rotation does not take effect

Good evening everyone, I need to rotate the texture of the model by 38 degrees. Why doesn’t it work? I think the official usage is also written in this way

The code is as follows:

   BABYLON.SceneLoader.ImportMesh('', "https://hyhh-fs.oss-cn-beijing.aliyuncs.com/model/", "ae23df53131146eba156a6886aee48f6.glb", scene, (meshes) => {
    var stdMaterial = new BABYLON.StandardMaterial("stdMaterial", scene);
    stdMaterial.diffuseTexture = new BABYLON.Texture("https://hyhh-fs.oss-cn-beijing.aliyuncs.com/model/d6cd3bb83f874c7a848b6c080aec41d4.jpeg", scene, false, false)
    var rotationAngle = BABYLON.Tools.ToRadians(38);
    stdMaterial.diffuseColor = new BABYLON.Color4(0.08509803, 1, 0, 1);
    stdMaterial.diffuseTexture.uvTransform = new BABYLON.Vector4(1, 1, rotationAngle, 0);
    stdMaterial.transparencyMode = BABYLON.Material.MATERIAL_OPAQUE;
    meshes[1].material = stdMaterial
    meshes[1].useVertexColors = false;
    scene.createDefaultCamera(true, true, true);
}, undefined, (error) => {
    console.log("error=", error);
});

I didn’t find such property as uvTransform in Babylon API.
I believe you may try to use texture wAng property.
Example - Babylon.js Playground

3 Likes

Thank you, I’ll give it a try