- Home /
Material Tiling Vector3
is it possible to adjust the tiling of a material on the z axis?
ive tried:
function Start(){
var scaleX : float = transform.localScale.x;
var scaleY : float = transform.localScale.y;
var scaleZ : float = transform.localScale.z;
renderer.material.mainTextureScale = Vector3(scaleX,scaleY,scaleZ);
}
it didn't give me any errors, but only the x and y worked.
Thanks, Sycohazza.
Answer by Bunny83 · Aug 17, 2012 at 08:06 PM
I'm not sure what you mean by z axis. The texture-space is 2D. You only have "u" and "v" or x and y. When you look in the documentation of Material-mainTextureScale you will see that it's a "Vector2".
Maybe you can give some more information about what you wanna do?
hope this image i made helps explain
http://i61.photobucket.com/albums/h59/uniquegamez/explanation.png
That's definitely something else. Some kind of wrapping issue by the look of it. Is that a default unity box? If so could I grab the texture on it to test?
yeah its just a Unity3D > GameObject > Cube
it seems to apply the x, y tiling to each face of the cube
Nope texture is fine. Try changing the shader to a normal diffuse shader. $$anonymous$$ight be the toon shader or toon ramp.
Your answer
Follow this Question
Related Questions
How to change material property of an instance through script 0 Answers
Real Sized Texture Tiling 2 Answers
Repeat texture common question 2 Answers
Error creating a material ? 1 Answer