Hi…
I used this script to open device camera :
public int selectedCam = 0;
private WebCamTexture webCamTexture;
public static double[] transMat = new double[16];
void Start()
{
// Initialize the webCamTexture and apply the webcam stream on the object
webCamTexture = new WebCamTexture();
GetComponent<Renderer>().material.mainTexture = webCamTexture;
webCamTexture.deviceName = WebCamTexture.devices[selectedCam].name;
// Start streaming the images captured by the webcam into the texture
webCamTexture.Play();
}
- this script attached to a panel and the main camera looking at it .
My questions:
1 - how can I let the panel size as the screen size (fullscreen) ?
2- camera (panel) rotate with the device (orientation)
3- the objects in the opening camera are scaled . ( I mean the size of objects not correct ) , how can I fix that ?
thank you so much …