Search Unity

Question Scroll texture in the direction of a mesh

Discussion in 'General Graphics' started by frances_farmer, Jun 5, 2023.

  1. frances_farmer

    frances_farmer

    Joined:
    Aug 29, 2019
    Posts:
    11
    I have a simple mesh as shown in the wireframe below. I want to be able to scroll a texture such that the movement follows the curvature of the mesh (so in the example below, it would curve to the left). The mesh is generated dynamically at runtime and will vary each time. I think I could achieve this by scrolling the UVs, but the way I have set up the UVs currently doesn't seem to be working as the texture scrolls relative to the world - the texture just scrolls in a single direction and doesn't follow the path of the mesh - if that makes sense. Any suggestions or advice on how best to achieve this?

    Screenshot 2023-06-04 214902.jpg