How can I add a repeating "arrow" texture to a Vectrosity line?
I'm writing a game which includes a 2D map at the bottom of the screen. As the player advances, they place waypoints. The map shows these waypoints connected by lines. When I draw Vectrosity lines using a material without a texture, they look good (crisp lines with a reasonable thickness). I want to add an arrow texture to the line but I can't get the thickness of the line, the size of the texture and the scaling right.
I've created a 200x50 pixel PNG texture which is a line with an arrow in the middle. Here's what happens with various parameters.
So what size should I make my texture? How thick should I set the line? Why won't SetTextureScale(1) make my arrow repeat at regular intervals?
My code looks roughly like this:
Actually, I update the lines dynamically by modifying line.points3, line.maxDrawIndex, and calling SetTextureScale() and DrawLine3D() every time. Possibly this is affecting the way they look but I hope not.
Any help appreciated.
It seems to work with some textures but not others. I can't tell if this is due to the proportions of the texture, the size, or some other factor. Making my texture shorter helped, but I don't think my initial texture was longer than the segment I was trying to apply it to.