|
hi, i am trying to convert two points that are used to render a line from space to screen points like this:
then i tried to render them like this:
but nothing happens if i do this
the line renders correctly but these are initial 3d points, so the line is rendered in world space... i am using this to render the line and rectangle that will hold the information about object line points to, so rectangle obviously needs screen space coords, these are converted the same way as above and the Rect appears where it should...so i dont know what is going on here? any ideas? EDIT: also i tried this:
and it doesnt render anything when i use startPoint and endPoint, which are in world space, then it renders nice 3D line... i dont know what is happening, this should render in the screen space...
(comments are locked)
|

What is Label, what is "line", and what Rect are you referring to? It's really hard to tell from your description and your code what you are doing. To make your questions easier to understand and answer, you should present code that only uses Unity API classes whenever possible.
If you're using a LineRenderer, then yes, it renders in world space (with points defined either in world or objects space).
If you want your lines to appear in front of objects, you will have to render them closer to the camera, or using a second camera.