2019年3月19日 星期二

8ㄍ VR實境課週記 Week05

Week 05


Step 01 編譯器環域更新

Step 02 下載THETA 基礎應用程式+拍攝360相片

Step 03 匯進unity

用skybox/Panoramic加入


Step 04增加cube 並撰寫 code


Step 05 增加sound並更改環域3D音效



CODE:
------
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;
    }
}
-------

沒有留言:

張貼留言