What would be the quickest way to have the length of the trajectory line draw dynamically? I was thinking maybe a raycast that would follow the line but I’m not sure if you can make a raycast act the same way.
Hey! Do you mean the shortest path by the "length" ? Generally the trajectory itself is not difficult to draw. It is the collision detection that is tricky. Drawing a line is done through a line renderer. A LineCast is a bit more efficient than Raycast if like in our example you know the points between which we need to look for collisions - if by quick you mean more efficient. I hope it helps!
What to do for making the trajectory line move straight in y axis only. I don't want to move the line renderer in z axis.
What would be the quickest way to have the length of the trajectory line draw dynamically?
I was thinking maybe a raycast that would follow the line but I’m not sure if you can make a raycast act the same way.
Hey!
Do you mean the shortest path by the "length" ? Generally the trajectory itself is not difficult to draw. It is the collision detection that is tricky. Drawing a line is done through a line renderer.
A LineCast is a bit more efficient than Raycast if like in our example you know the points between which we need to look for collisions - if by quick you mean more efficient.
I hope it helps!