I’m using a Kinect 2 camera and it has a Texture2D that is an RGB feed from the camera. I want to rotate that texture to always face the camera.
Here’s the code that creates the Texture2D. I tried kinect_rgb.transform but I get a message that there is no definition for that.
Texture2D kinect_rgb;
// Use this for initialization
void Start () {
KinectManager manager = KinectManager.Instance;
if (manager && manager.IsInitialized ()) {
kinect_rgb = manager.GetUsersClrTex ();
GetComponent<Renderer>().material.mainTexture = kinect_rgb;
}
}