From cf04c3313abea2f465073356e1890a882dfe2e95 Mon Sep 17 00:00:00 2001 From: Ryan Huffman Date: Fri, 2 Jan 2015 11:43:41 -0800 Subject: [PATCH] Update inWorldTestTone.js to play in front of avatar --- examples/inWorldTestTone.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/examples/inWorldTestTone.js b/examples/inWorldTestTone.js index 4547309faa..660965569c 100644 --- a/examples/inWorldTestTone.js +++ b/examples/inWorldTestTone.js @@ -17,9 +17,13 @@ var sound = SoundCache.getSound(HIFI_PUBLIC_BUCKET + "sounds/220Sine.wav"); var soundPlaying = false; +var offset = Vec3.normalize(Quat.getFront(MyAvatar.orientation)); +var position = Vec3.sum(MyAvatar.position, offset); + function update(deltaTime) { if (!Audio.isInjectorPlaying(soundPlaying)) { soundPlaying = Audio.playSound(sound, { + position: position, loop: true }); print("Started sound loop");