ok so the title says it all, but let me elaborate. im trying to create a river, i have my transparent texture/riverbed created. i have a river textured mesh that flows but i want to change the direction it flows IE it flows along the X axis and i want to to flow off the y (i may have the directions wrong but basically i just want to change the flow’s direction.
here is my current code (found online via various search attempts)
public class mywaterscript : MonoBehaviour {
public float OffSetSpeed = 0.5f;
// Update is called once per frame
void Update () {
float Offset = Time.time * OffSetSpeed;
renderer.material.mainTextureOffset = new Vector2(Offset,Offset);
}
}
any help/tips/explanations would be welcome (i have no exp in any type of coding and im trying to teach myself)