General question regarding offsetting a line

What would be the ideal way to go about trying to offset a line to it’s right if you were looking at it parallel to the camera view, and the origin is closest to the camera, the destination is directly beyond that?

My pedestrian waypoints are bidirectional, but the lines end up overlapping and it makes it a bit more difficult to see at a glance if a particular set of waypoints have both directions set.

In the image below, the left side is how it ends up when there is an arrow line going from one point to another, and then another line going in the opposite direction. I am looking for a way to offset it, as seen in the right side of the image.

I thought that perhaps using the following scope item might help:

using (Draw.InLocalSpace(waypoint.transform)) {}

I am not sure what to do about the destination waypoints position though. trying to simply use its world position doesn’t work and ends up being way off. It feels like the localspace probably isn’t the best choice for this particular situation, but I am not quite sure what would.

Do you have any recommendations?

Hi

Something like

point + Camera.main.transform.right * 0.2 would work

Is very simple and would work. It does not have the best performance since Camera.main is kinda slow, but it might work well enough for you.

I had tried a number of things I found online, but none of them had an outcome that I was looking for. It doesn’t need to actually be dependent on the camera, that was originally for reference as to direction, but then I figured making a drawing might be better.

For the origin of the line, I tried to use:

var offset = wpKey.transform + wpKey.transform.TransformVector(new Vector3(-0.1f, 0, 0));

Then for the destination:

var offset2 = wpList[i].transform.position + wpList[i].transform.TransformVector(new Vector3(0.1f, 0, 0));

I also tried these two:

wpList[i].gameObject.transform.TransformPoint(Vector3.right * 0.1f);
wpList[i].gameObject.transform.TransformVector(Vector3.right * 0.1f);

I could only seem to make it move on the world X-axis, not offset on the local X-axis to the right, then translate that to its world position. I am not sure if I need to try and use the Draw.InLocalSpace in conjunction with that and then try to do something else with the world position of the target, or what would work best for the lines.