VAUListener.cs 723 Bytes
Newer Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
using UnityEngine;
using System;
using System.Collections;
using VA;


public class VAUListener : MonoBehaviour {

    int Listener;
    private VANet _VA = VAUAdapter.VA;
    // Use this for initialization
    void Start()
    {
        Listener = _VA.CreateListener("MyListener", 123, VAUAdapter.DefaultHRIR);
    }
	
	// Update is called once per frame
	void Update ()
    {
        Transform t = GetComponent<Transform>();        
        _VA.SetListenerPosition(Listener, t.transform.position.x, t.transform.position.y, -t.transform.position.z);
        _VA.SetListenerOrientationYPR(Listener, -t.transform.rotation.eulerAngles.x, -t.transform.rotation.eulerAngles.y, t.transform.rotation.eulerAngles.z);
    }


}