2019年3月19日 星期二

逸臻的筆記Week05-360skybox

-360skybox-

1.下載THETA應用程式

拍照後開啟

2.用Unity加入360照片,開啟
加入wav音檔 設定數值並加入程式
達到環繞音的效果

音效程式:
using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class mysound : MonoBehaviour
{
    // Start is called before the first frame update
    public GameObject aaa;
    float angle=0;
    float len;
    void Start()
    {
        len=1000;
    }

    // Update is called once per frame
    void Update()
    {
        aaa.transform.position = new Vector3(len*Mathf.Cos(angle), 1, len*Mathf.Sin(angle));
        angle += 0.01f;
    }
}


沒有留言:

張貼留言