mirror of
https://github.com/overte-org/overte.git
synced 2025-08-09 21:43:03 +02:00
Merge pull request #4030 from huffman/220-position
Update inWorldTestTone.js to play in front of avatar
This commit is contained in:
commit
90cf9acef1
1 changed files with 4 additions and 0 deletions
|
@ -17,9 +17,13 @@ var sound = SoundCache.getSound(HIFI_PUBLIC_BUCKET + "sounds/220Sine.wav");
|
||||||
|
|
||||||
var soundPlaying = false;
|
var soundPlaying = false;
|
||||||
|
|
||||||
|
var offset = Vec3.normalize(Quat.getFront(MyAvatar.orientation));
|
||||||
|
var position = Vec3.sum(MyAvatar.position, offset);
|
||||||
|
|
||||||
function update(deltaTime) {
|
function update(deltaTime) {
|
||||||
if (!Audio.isInjectorPlaying(soundPlaying)) {
|
if (!Audio.isInjectorPlaying(soundPlaying)) {
|
||||||
soundPlaying = Audio.playSound(sound, {
|
soundPlaying = Audio.playSound(sound, {
|
||||||
|
position: position,
|
||||||
loop: true
|
loop: true
|
||||||
});
|
});
|
||||||
print("Started sound loop");
|
print("Started sound loop");
|
||||||
|
|
Loading…
Reference in a new issue