0 votes

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..

enter image description here

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

in Engine by (31 points)

1 Answer

0 votes

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:
https://github.com/godotengine/godot/issues/2552#issuecomment-144050436
look at this code from LeonardMeagher2 for a how to:
https://github.com/LeonardMeagher2/Godot-Assets/blob/master/Scenes/2DTrail.gd

by (76 points)
Welcome to Godot Engine Q&A, where you can ask questions and receive answers from other members of the community.

Please make sure to read Frequently asked questions and How to use this Q&A? before posting your first questions.
Social login is currently unavailable. If you've previously logged in with a Facebook or GitHub account, use the I forgot my password link in the login box to set a password for your account. If you still can't access your account, send an email to webmaster@godotengine.org with your username.