mirror of
https://github.com/overte-org/overte.git
synced 2025-04-20 18:44:01 +02:00
fix audio position in editVoxles.js
This commit is contained in:
parent
7b50e6d4ef
commit
d8bf5be68b
1 changed files with 3 additions and 2 deletions
|
@ -400,9 +400,9 @@ function calcScaleFromThumb(newThumbX) {
|
|||
}
|
||||
|
||||
function setAudioPosition() {
|
||||
var camera = Camera.getPosition();
|
||||
var position = MyAvatar.position;
|
||||
var forwardVector = Quat.getFront(MyAvatar.orientation);
|
||||
audioOptions.position = Vec3.sum(camera, forwardVector);
|
||||
audioOptions.position = Vec3.sum(position, forwardVector);
|
||||
}
|
||||
|
||||
function getNewPasteVoxel(pickRay) {
|
||||
|
@ -735,6 +735,7 @@ function trackKeyReleaseEvent(event) {
|
|||
if (event.text == "TAB") {
|
||||
editToolsOn = !editToolsOn;
|
||||
moveTools();
|
||||
setAudioPosition(); // make sure we set the audio position before playing sounds
|
||||
showPreviewGuides();
|
||||
Audio.playSound(clickSound, audioOptions);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue