GDquest has started a new kickstarter campaign to create a professional tutorial for Godot, focused on 2d games.
"Learn to create 2d games with the award-winning, Open Source engine Godot 3. Free daily tutorials on Youtube during the campaign!" "You will learn to create your own top-down game inspired by Zelda"

Draw text along a circle/arc/path?

bitwesbitwes Posts: 41Member

Is there a simple way to draw text along an arc or any arbitrary path? I could imagine using draw_char but I don't know how I would rotate the character.


  • cdqwertzcdqwertz Posts: 4Member
    edited April 5 Answer ✓

    You can use draw_set_transform (

    Something like this should work.

    var my_string = "Hello World"
    var x = (360) / my_string.length()
    for i in range(0, my_string.length()):
        draw_set_transform(Vector2(0, 0), deg2rad(i * x - (my_string.length()/2*x)), Vector2(1,1))
        draw_char(font, Vector2(0, -30), my_string[my_string.length()-i-1], "", Color(0, 0, 0)
  • bitwesbitwes Posts: 41Member

    I did not see that this got answered. That worked great. Thanks for doing the leg work, it looks about as ugly as I imagined it would be ;). Thanks.

    To get it working I added a label to the scene and used var font = get_node("font_label").get_font('') to populate the font...just in case anyone else is all..."font isn't defined" and what not. It's a dumb hack and I know there are other ways to do this but I was lazy.

Sign In or Register to comment.