orthographic and perspective camera overlay


I currently have 2 cameras; 1 perspective and 1 orthographic. I made a script that lets the user draw on the screen. I have zero experience with cameras so it’s really hard to explain :
My problem: When I draw, it draws on the screen of the ortographic camera and not on the perspective one.



   public Camera camera;
	// Update is called once per frame
	void Update () 
		var pos = camera.ScreenToWorldPoint(Input.mousePosition);
		print(pos + "--" + Camera.main.ScreenToWorldPoint(Input.mousePosition));
		pos.z = camera.transform.position.z + 5;
		transform.position = Vector3.Lerp(transform.position, pos, Time.deltaTime);
	void OnMouseDown()
		gameObject.renderer.enabled = true;	

EDIT: So while working on something else, apparently I moved my ortho camera. When I tried drawing again this morning, it worked a lot better than yesterday. I guess it didn’t work yesterday because the position of my ortho cam was off. It now looks like this: http://i46.tinypic.com/o5nd3b.png

I have another question though. The lines I draw actually go through the gameobject I have placed in my scene (http://i50.tinypic.com/2uohnk0.png). How can I draw them in front of the objects without changing the z-axis of where they are drawn (because changing z-axis makes the line wider / thinner).

I think you may want to look at the “Culling Mask” for your cameras – make a layer for the curves you are drawing and place them onto that layer. Then make sure that layer is only checked on your perspective cam’s “Culling Mask” and not on your ortho cam.

Got it. Changed the shader of my material to FX/Flare

Change the rendering path to vertexlit.