Strange Polygon2D ?

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By Linkpy
:warning: Old Version Published before Godot 3 was released.

Hello !

I’m currently working on a rythme game, and I want to create “slider”, with is a long note in the game. And a slider is defined as a simple cubic bezier curve. So I use Polygon 2D for making the “slider background”. But…

So… Like you can see, the texture doesn’t snap to polygon points, giving a weird look to my slider.

Have you an advice, or do you know how to force UV texture to be “on” polygon points, and not like this ?

Thanks you !

PS: If you want the UV : http://img15.hostingpics.net/pics/484927Screenshot4.png

:bust_in_silhouette: Reply From: hearto

I had the same problem on my laser implementation with polygons:
https://gfycat.com/DrearyMadeupBlobfish
You need to manually create the polygons on code to correct the uv, more about this here:

look at this code from LeonardMeagher2 for a how to:
https://github.com/LeonardMeagher2/Godot-Assets/blob/master/Scenes/2DTrail.gd