RenderTexture on GUI.

I dont know if the topic is right for this kind of problem as I already know how to show render texture on GUI, but the problem is this:

This is what I have:

33644-face.png

And this is what I’d like to have:

33646-face2.png

So the question is: Is there anyway to prevent RenderTexture from going over the borders of that GUI? What I’m trying to do here is an “FaceCam” for player. I’ve done this so that there’s Camera in front of player model and it’s being drawn to that position with GUI.DrawTexture(Rect(0,0,0,0)… etc.

Other than that problem that it goes over borders of that circle, its working fine. :slight_smile: Sorry about my English, it’s not my native language and it’s late night already here.

For GUI.DrawTexture() you will always have a rectangular area. But there is a method to make part of the picture invisible. Simply in that area it is necessary to use alpha channel equal 0. I.e. for your camera it is necessary to create an alpha mask: the circle on boundary and which corners alpha channel is equal 0. I.e. the circle is similar to that you want to receive. Further, RenderTexture will remember rectangular area, but on corners the alpha channel will be 0. I hope that it will help you.