# Rotate image texture

**URL:** <https://forum.babylonjs.com/t/rotate-image-texture/10399>\
**Category:** Questions\
**Created:** [April 29, 2020, 2:06am UTC](https://forum.babylonjs.com/t/rotate-image-texture/10399 "2020-04-29T02:06:47Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![Ilyes\_ELAYEB](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/ilyes_elayeb/32/7662_2.png) [@Ilyes\_ELAYEB](https://forum.babylonjs.com/u/Ilyes_ELAYEB)\
**Post date:** [April 29, 2020, 2:06am UTC](https://forum.babylonjs.com/t/rotate-image-texture/10399/1 "2020-04-29T02:06:48Z")

</div>

Good evening, everyone. I hope you’re all well,  
I have a small question, I put on my 3D shirt.  
a textured image with stripes, I would like to rotate the image so that the stripes are horizontal on my model.  
is there a way to rotate the image before i diffuse it on the material ?

---

<div class="post-metadata">

**Author:** ![Anderson34](https://avatars.discourse-cdn.com/v4/letter/a/6f9a4e/32.png) [@Anderson34](https://forum.babylonjs.com/u/Anderson34)\
**Post date:** [April 29, 2020, 3:21am UTC](https://forum.babylonjs.com/t/rotate-image-texture/10399/2 "2020-04-29T03:21:21Z")

</div>

Hello!

I’m not 100% sure, but you might look at this example to see how the wheel textures are applied.  
[https://www.babylonjs-playground.com/#102TBD#33](https://www.babylonjs-playground.com/#102TBD#33)

These lines in particular:

//set texture for flat face of wheel  
var faceUV =[];  
faceUV[0] = new BABYLON.Vector4(0,0,1,1);  
faceUV[2] = new BABYLON.Vector4(0,0,1,1);

If you’re working with a custom mesh, you can also adjust the UV maps with the modeling program (i.e. Blender).

---

<div class="post-metadata">

**Author:** ![nogalo](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/nogalo/32/120_2.png) [@nogalo](https://forum.babylonjs.com/u/nogalo)\
**Post date:** [April 29, 2020, 11:22am UTC](https://forum.babylonjs.com/t/rotate-image-texture/10399/3 "2020-04-29T11:22:45Z")

</div>

[https://www.babylonjs-playground.com/#T32V41](https://www.babylonjs-playground.com/#T32V41)

Does something like this work for you?

You can rotate the texture using some of these params vAng, uAng, wAng.

---

<div class="post-metadata">

**Author:** ![Ilyes\_ELAYEB](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/ilyes_elayeb/32/7662_2.png) [@Ilyes\_ELAYEB](https://forum.babylonjs.com/u/Ilyes_ELAYEB)\
**Post date:** [April 29, 2020, 12:40pm UTC](https://forum.babylonjs.com/t/rotate-image-texture/10399/4 "2020-04-29T12:40:24Z")

</div>

thnax for your reply ,  
i forgot to say that im usinf pbr and wAng dosent exist with pbr  
this 's my code

pbr.albedoTexture = new BABYLON.Texture(this.texture, this.scene);  
pbr.metallic = 0.0;  
pbr.roughness = 1;  
pbr.sheen.isEnabled = true;  
this.col.material = pbr;

---

<div class="post-metadata">

**Author:** ![Evgeni\_Popov](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/evgeni_popov/32/4432_2.png) [@Evgeni\_Popov](https://forum.babylonjs.com/u/Evgeni_Popov)\
**Post date:** [April 29, 2020, 12:45pm UTC](https://forum.babylonjs.com/t/rotate-image-texture/10399/5 "2020-04-29T12:45:20Z")

</div>

Why `wAng` would not exist for pbr? It’s a property of the texture, so not related to pbr.

---

<div class="post-metadata">

**Author:** ![Ilyes\_ELAYEB](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/ilyes_elayeb/32/7662_2.png) [@Ilyes\_ELAYEB](https://forum.babylonjs.com/u/Ilyes_ELAYEB)\
**Post date:** [April 29, 2020, 12:47pm UTC](https://forum.babylonjs.com/t/rotate-image-texture/10399/6 "2020-04-29T12:47:45Z")

</div>

![Capture d’écran de 2020-04-29 13-46-54](https://us1.discourse-cdn.com/flex024/uploads/babylonjs/original/2X/3/3de3475a26af665b129e63eb797c2c8f1f732cca.png)

---

<div class="post-metadata">

**Author:** ![sebavan](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/sebavan/32/57_2.png) [@sebavan](https://forum.babylonjs.com/u/sebavan)\
**Post date:** [April 29, 2020, 12:59pm UTC](https://forum.babylonjs.com/t/rotate-image-texture/10399/7 "2020-04-29T12:59:00Z")

</div>

The property is a BaseTexture which does not have the param as it would for instance not fit on a CubeTexture.

You should:

```auto
const texture = new BABYLON.Texture .... ;
texture.vAngle = ...

pbr.albedoTexture = texture;

```

---

<div class="post-metadata">

**Author:** ![Evgeni\_Popov](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/evgeni_popov/32/4432_2.png) [@Evgeni\_Popov](https://forum.babylonjs.com/u/Evgeni_Popov)\
**Post date:** [April 29, 2020, 1:00pm UTC](https://forum.babylonjs.com/t/rotate-image-texture/10399/8 "2020-04-29T13:00:48Z")

</div>

It seems VSC shows only the properties of the base type of the property declared in the declaration file for `albedoTexture`, which is a `BaseTexture` (which does not have wAng, nor uAng / vAng). But as you created a `Texture`, it does definitely have a wAng, uAng and vAng properties.

Try `(pbr.albedoTexture as Texture).`

---

<div class="post-metadata">

**Author:** ![nogalo](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/nogalo/32/120_2.png) [@nogalo](https://forum.babylonjs.com/u/nogalo)\
**Post date:** [April 29, 2020, 1:03pm UTC](https://forum.babylonjs.com/t/rotate-image-texture/10399/9 "2020-04-29T13:03:22Z")

</div>

Yes. It doesn’t show any of those props even in StandardMaterial. Just use it as shown and it will work. 🙂
