找回密碼
 注冊帳號

掃一掃,訪問微社區

audiochorusfilter.spread 擴散

2015-1-3 15:27| 發布者: 楊炎| 查看: 1978| 評論: 0|原作者: 蠻牛|來自: unity3d腳本manual

摘要: audiosource.spread 擴散varspread: floatdescription描述sets the spread angle a 3d stereo or multichannel sound in speaker space.設置3d stereo的擴散角或揚聲器空間的多聲道聲音。0 = all sound channels are ...

audiosource.spread 擴散

varspread: float

description描述

sets the spread angle a 3d stereo or multichannel sound in speaker space.

設置3d stereo的擴散角或揚聲器空間的多聲道聲音。

0 = all sound channels are located at the same speaker location and is 'mono'. 360 = all subchannels are located at the opposite speaker location to the speaker location that it should be according to 3d position. default = 0.

0=所有聲音通道位于相同的揚聲器位置并且是單聲道。360=所有子通道位于對面揚聲器的位置到揚聲器位置,這應該根據3d位置。默認為0。

c#

javascript

using unityengine;

using system.collections;

public class example :monobehaviour{

void ontriggerenter(colliderother) {

if (other.audio)

other.audio.spread = 0;

}

void ontriggerexit(colliderother) {

if (other.audio)

other.audio.spread = 360;

}

}

// when any audiosource goes trough this transform, it will set it as 'mono'

// and will restore the value to 3d effect after exiting

// make sure the audio source has a collider.

//當任意audiosource通過這個變換,將設置它為單通道,并且退出后恢復值到3d效果

//確定音頻源有一個碰撞

function ontriggerenter(other :collider) {

if(other.audio)

other.audio.spread = 0;

}

function ontriggerexit(other :collider) {

if(other.audio)

other.audio.spread = 360;

}

相關閱讀

文章點評
相關文章
女校游泳队彩金