The Line2D Node explained (Godot Tutorial)

Поділитися
Вставка
  • Опубліковано 14 лют 2020
  • In todays's video we'll cover the Line2D node in Godot. This includes basic functionality as well as making animations with it.
    ♠♣♥♦ Want to make your own survival horror game? Check this out: martin-senges.itch.io/surviva... ♠♣♥♦
    My website: martin-senges.eu/
  • Ігри

КОМЕНТАРІ • 8

  • @pierrenagonio1120
    @pierrenagonio1120 4 роки тому

    THX Friend for excellen explained content.

  • @alexbobinski1039
    @alexbobinski1039 4 роки тому

    Awesome! thanks for this!

  • @xaksis
    @xaksis 4 роки тому +2

    Interesting ! I had no idea you could do stuff like that with Line2D ...

  • @xaksis
    @xaksis 2 роки тому

    Hi Martin, I was wondering how you use this 2d node in your 3d game ? For instance, how can you get the player character to draw a symbol on the floor ?

    • @martin_senges
      @martin_senges  2 роки тому

      I'm not using Line2D in 3D. In my game I'm currently just using simple image textures and Sprite3D for the symbols. Though I might change that once I get to polishing. Could either go with animated sprite frames or a custom shader, haven't decided yet. However if you need a free form symbol/object, the ImmediateGeometry node seems to be the 3D variant to Line2D. Though I haven't used that one yet in my project.

    • @xaksis
      @xaksis 2 роки тому

      @@martin_senges Thank you for the explanation.
      I came across the IG node ... but it seems more limited ? I didn't see a way to customize the lines. If you add a material, I would guess it is going to be used on faces, not edges ...
      I have found a way to use line2D under a viewport node in a 3d project, but I dislike using vp's this way. It is clumsy to use.

    • @martin_senges
      @martin_senges  2 роки тому

      @@xaksis Yes for texture materials you'd need to create "lines" with faces. As in small interconnected boxes, pyramids, whatever. Small enough to look like lines to the viewer (the unshaded material flag might be helpful as well). Instead of limited, I'd call ImmediateGeometry "more low level" than all other nodes, including Line2D. You can do a lot with it, if you know how.
      I'm not a fan of using many viewports myself, as there is a runtime cost attached. For some effects they are necessary but often enough you can find a cheaper solution. Be it immediate geometry, a custom fragment shader an animated sprite3D or whatever. The "best" solution really depends on the specific use case.