美文网首页Unity技术VR/AR分享Unity教程合集
AR开发实战Vuforia项目之多图识别制作与交互

AR开发实战Vuforia项目之多图识别制作与交互

作者: TonyWan_AR | 来源:发表于2017-05-25 07:09 被阅读733次

一、框架视图

二、获取授权码

三、创建识别图

四、下载SDK

五、搭建场景

导入资源
同理:

多图识别制作与交互

触发脚本
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;

public class Test : MonoBehaviour
{

    /// <summary>
    /// 两图片碰到的时候吧物体隐藏
    /// </summary>
    /// <param name="other"></param>
    void OnTriggerEnter(Collider other)
    {
        transform.gameObject.SetActive(false);
        other.gameObject.SetActive(false);
    }

    /// <summary>
    /// 两图片碰到的时候把物体显示
    /// </summary>
    /// <param name="other"></param>
    void OnTriggerExit(Collider other)
    {
        transform.gameObject.SetActive(true);
        other.gameObject.SetActive(true);
    }
}

效果展示

相关文章

网友评论

    本文标题:AR开发实战Vuforia项目之多图识别制作与交互

    本文链接:https://www.haomeiwen.com/subject/ysvvxxtx.html