Drawing Lines between 2 moving objects stutters.

Hi,

I am currently creating a prototype in which a line needs to be drawn between a player and an object in the world. However, when the player moves, the line that is drawn to the player stutters. At some point, the other object will move also.

I know that this is just a prototype and the stutter shouldn’t bother me. However, it does and it has made me curious. Does anyone have any ideas on how to remove the stutter or an alternative method of drawing the lines between these two objects?

I achieve the movement by just changing the position of one of the points in the line renderer every update.

Thanks in advance.

“When” do you change the position of the point in the line renderer? If it’s done in a seperate script you might want to use LateUpdate instead of Update. An alternative is that you setup the script execution order in a way that your player movement script is executed before the line adjustment script executes.