- Home /
Vectrosity 3D Line facing Vector3.up
Hi there,
I'm using Vectrosity to render 3D lines and as intended these lines are always facing the camera with their full weight.
Now I want to use some 3D lines to draw a path on the y=0 plane of the world. These lines should always face upwards (Vector3.up). So even as the camera moves the lines remain fixed at their position not being rotated towards the camera.
Is there a simple way to do this? I tried a bit around with Vector.SetCamera but only with strange results.
Best Regards, svf
Answer by Eric5h5 · Oct 05, 2011 at 09:27 AM
It's not really intended to do that sort of thing, but if you make the main camera point straight down along the Y axis, then use Vector.DrawLine3D to draw the line, the line will be oriented to face Vector3.up. Then you can put the camera back, and as long as you don't re-draw the line, it will stay oriented that way from then on.
That works well. cameraTop.transform.localPosition ( new Vector3 ( 0, 100, 0 ) ); cameraTop.transform.localEulerAngles = new Vector3 ( 90, 0, 0 ); Vector.SetCamera3D ( cameraTop );
Your answer
![](https://koobas.hobune.stream/wayback/20220612235347im_/https://answers.unity.com/themes/thub/images/avi.jpg)