Draw a line between two points with a Plane making it face to the player.

Hi!

I have a Blueprint Actor with a plane as static mesh.

I want to create something similar to a line with it. I will have a start and end point.

I think I need to resize it so that it fills the whole space between these two points. It’s like drawing a line between the two points. I also need to orient it to where the player is. I know how to do this second part, but I have no idea about the other part. I think it would be to place the actor in the middle point and rotate it so that as it increases in size it ‘draws’ a line connecting those two points.

Who can I do it?

I’m going to explain it in other words. I have a start and end point, a vector from start point to end point, the midpoint between start and end points, and an actor with a plane as a static mesh. The actor will have the static mesh on XY plane, or maybe, on ZY plane.

I think these are the steps that I need:

  1. Spawn the actor at midpoint.
  2. Rotate the actor so that as I increase the size of the actor (scale it), it grows towards the start point and towards the end point.
  3. I have also to rotate the actor to make it face to player because the static mesh is only visible from one side.

I know how to scale it, how to make it face to the player, but I don’t know how to do point 2, and point 3 without undoing point 2.

Thanks!

It can’t be done, if you think about it :slight_smile:

Imagine this scenario

image

You can’t put a plane in here that joins the points and faces the player ( arrow ).

But I did it:

The actor is the “line” between the two dots.

I thought it had to face the player?

I have a square plane, and I need it do “draw” a line between two points. And also, it has to face the player.

I’ve added a better explanation of what I’m trying to do in the question.

1 Like