HTC Vive前置摄像头API(未测试)
/*WebCamTexture:网络摄像头材质
WebCamTexture.Play() 播放;
WebCamTexture.Pause() 暂停;
WebCamTexture.Stop() 停止;*/
//经测试此代码可以使用,当你绑定到游戏物体时尽可以了、
using unityEngine;
using System.Collections;
public class Test : MonoBehaviour {
public string deviceName;//这个虽然public,但无需为其绑定变量,直接运行,默认调用,显示本地摄像机的名称
WebCamTexture webCam; // Use this for initialization
void Start () {
WebCamDevice[] devices = WebCamTexture.devices;
deviceName = devices[0].name;
webCam = new WebCamTexture(deviceName, 400, 300, 12);
renderer.material.mainTexture = webCam;
webCam.Play();
} // Update is called once per frame
void Update () { }
}
上述代码,使用标准化的webcam
更多参考:unity3d 中控制手机前后摄像头切换
2.steam论坛中介绍方法:
It's all wrapped up on the SteamVR_TrackedCamera script included with the SteamVR plugin on the Unity Asset Store: http://u3d.as/content/valve-corporation/steam-vr-plugin
We also include a test script to demonstrate usage:
https://github.com/ValveSoftware/steamvr_unity_plugin/blob/master/Assets/SteamVR/Extras/SteamVR_TestTrackedCamera.cs
3. 用OpenVR的API打开,此法不是在unity环境中
4.自定义的plugin
It's a standard webcam/capture device. I'd imagine you can use the built in webcam texture system from unity to access it.
I personally use my own plugin (http://popmovie.xyz/ & https://www.assetstore.unity3d.com/#!/content/59097 ) but it's nothing special, anything that uses mediafoundation to capture webcams should be able to cope with it.
HTC Vive前置摄像头API(未测试)的更多相关文章
- 如何用openvr api打开vive前置摄像头
随着越来越多的开发者开始他们的VR开发工作,他们看到了这项技术的巨大潜力,像是Valve这样的公司正在想办法保证他们的软件开发包(SDK)能够提供尽量多的功能.今天这家公司发布了其针对SteamVR的 ...
- HTC Vive的定位技术
Lighthouse空间定位,chaperone系统避免实际障碍物 HTC vive所用的Lighthouse技术属于激光定位技术,Oculus Rift以及索尼PlayStation VR所用的定位 ...
- 如何低成本的打造HTC Vive虚拟演播室直播MR视频?
http://m.toutiao.com/i6298923859378700802/?tt_from=weixin&utm_campaign=client_share&from=gro ...
- 如何透过HTC Vive拍摄Mixed Reality (混合现实)影片
https://www.vive.com/cn/forum/1706?extra=page%3D1 也许你是一位开发者,想为自己的HTC Vive游戏制作酷炫的宣传片:或者你是游戏主播,想为观众带来高 ...
- Unity的HTC VIVE SDK研究(手柄按键功能的研究,比较详细)
http://blog.csdn.net/ystistheking/article/details/51553237 想交流的朋友我们可以微博互粉,我的微博黑石铸造厂厂长 ,缺粉丝啊 .....求粉求 ...
- vue实现PC端调用摄像头拍照人脸录入、移动端调用手机前置摄像头人脸录入、及图片旋转矫正、压缩上传base64格式/文件格式
进入正题 1. PC端调用摄像头拍照上传base64格式到后台,这个没什么花里胡哨的骚操作,直接看代码 (canvas + video) <template> <div> &l ...
- HTC Vive 体验的折腾经历
HTC Vive 是个什么东西, 想必我就不用介绍了, 不知道自己百度吧 HTC Vive发布已经有一段时间了, 一直很纠结买还是不买, 这玩意太贵(官网6888),买了还不能直接用, 还要配太高性能 ...
- 【转+自己研究】新姿势之Docker Remote API未授权访问漏洞分析和利用
0x00 概述 最近提交了一些关于 docker remote api 未授权访问导致代码泄露.获取服务器root权限的漏洞,造成的影响都比较严重,比如 新姿势之获取果壳全站代码和多台机器root权限 ...
- C++ primer学习记录(个人猜想未测试版本)
学习版本:第五版. 本博文主要记录个人曾经并不知晓知识细节. 因为linux下的编译环境还未进行学习.所以实际代码测试将在今后完成. 红色:需确认. 蓝色:重点. 1)const对象设定为仅在文件内有 ...
随机推荐
- JQuery - Tab Control
http://jqueryui.com/tabs/ <!doctype html> <html lang="en"> <head> <me ...
- 怎么在windows7下搭建服务器
怎么在windows7系统安装IIS 图文教程 http://jingyan.baidu.com/article/1e5468f92f6e05484961b703.html 以下本人为列:第一步:先按 ...
- caffe安装编译问题-ImportError: libopencv_core.so.3.4: cannot open shared object file: No such file or directory
问题描述 >>> import caffe Traceback (most recent call last): File , in <module> File , in ...
- CTF密码学之摩斯密码
通过不用的排列顺序来表达不用的英文字母,数字和标点符号,摩斯电码由.和_构成 字母 字符 电码符号 字符 电码符号 A ._ N _. B _... O _ _ _ C _._. P ._ _. D ...
- OJ链接
BNU..好难找..http://www.bnuoj.com
- RPC好,还是RESTful好?
看到知乎上有这样一个问题 WEB开发中,使用JSON-RPC好,还是RESTful API好? 还有其他优秀的推荐方案吗? -------------------------------------- ...
- JAVA中String对象的比较
JAVA中String对象的比较 1.首先介绍三个String对象比较的方法:(1)equals:比较两个String对象的值是否相等.例如: String str1 = "hello qu ...
- MongoDB注册Windows服务启动
下载MongoDB安装到:E:\Work_App\MongoDB 这个目录 安装:E:\Work_App\MongoDB (安装在专门的目录中) 配置: 1.在E:\Work_App\MongoDB\ ...
- zstack快速安装文档
1.环境准备 1.1 准备软件工具 系统镜像 ZStack-x86_64-DVD-2.1.1.514.iso Zstack安装包 ZStack-installer-2.1.1.514.bin http ...
- TNS-12535 TNS-00505的处理方法
原文地址:TNS-12535 TNS-00505的处理方法 作者:wzq609 硬件说明: 操作系统版本:ORACLE LINUX 6.3 64位 数据库版本:11.2.0.3 64位 问题说明 ...