No announcement yet.

Draw lines in 3D-space

  • Filter
  • Time
  • Show
Clear All
new posts

    Draw lines in 3D-space


    I am struggling on a problem, I am working on.

    In my project, there are several blueprint-actors, lets say they are icons. Some of them shall have a visible connection (a line) to some of the others.
    Each icon already contains an array, which stores the icons, where this icon shall have a connection to.

    Now I want to draw a line between connected icons.
    Because I did't have a better idea, I created a cylinder in blender, because I needed the origin on the base of the cylinder.
    Then, for each connection, a new reference of this cylinder is being spawned, positioned, scaled and rotated to point to the connected icon. That works almost.
    Unfortunately, the cylinder points the wrong direction and I have no idea, how to fix it.

    Alternatively, I can imagine a way to have a line drawn instead of the cylinder. Just like the linetrace does.
    Unfortunately the linetrace doesn't have many options to tweak (color, width, etc). And I don't have any good idea to get a line in 3D-space on my own.

    Maybe someone can help me?
    Please have a look at the attached images. They might illustrate, what I am wanting to do.

    Attached Files

    Something like this maybe?

    "Draw Debug Line" Blueprint Documentation


      Looks good, I'll have a look. Thank you.