- 2007年発売
- 30fps
- カメラの移動と画面への反映へのラグは感じる
- Logicoolのサイトから適当に現在サポートしているカメラからソフトウェアをDL
- Win7用とか書いてあるけど、動くやろ!とインストール
- 動いた。10年前くらいに見た懐かしいカメラ操作UIがあった
Unityで動かしてみる
using UnityEngine;
using System.Collections;
public class Cam : MonoBehaviour
{
void Start()
{
WebCamDevice[] devices = WebCamTexture.devices;
for (int i = 0; i < devices.Length; i++)
Debug.Log(devices[i].name);
}
}
using UnityEngine;
using System.Collections;
public class ExampleClass : MonoBehaviour
{
void Start()
{
WebCamTexture webcamTexture = new WebCamTexture("Logicool Qcam Pro 9000");
Renderer renderer = GetComponent<Renderer>();
renderer.material.mainTexture = webcamTexture;
webcamTexture.Play();
}
}
- デバイス一覧を知っておく
- WebCamTextureのコンストラクタ引数にデバイス名を入れる
- Planeにカメラ映像を映す
- 映った。ラグは公式のLogicoolソフトウェアと同じくらい