a few hurdles I had getting started with spatial audio:
How do I scale "my game space" to "howler space"
Remember that howler's pos()
is arbitrarily different than your position units - I found that anything beyond approx 5 "howler units" was silent. In my game, 5 units is a tiny distance, so I was confused that I couldn't hear anything. A small middleware function solved the problem of going back and forth between game units and howler units.
Taking a threejs Vector3 and scaling down by a factor of 100 to meet howler units:
const scale_howler_pos = vector => {
const howler_pos = []
for( const coord of vector.toArray() ) {
howler_pos.push( coord / 100 )
}
return howler_pos
}