ID:2534538
 
Applies to:DM Language
Status: Open

Issue hasn't been assigned a status value.
Would it be possible to get a client.soundX/Y/Z/etc?

Or at least tie the game camera to the sound attributes position?
Relevant FMOD function: System::set3DListenerAttributes

Proposed feature:
client.sound_pos = list(x,y,z)
OR client.sound_x/y/z = x/y/z
client.sound_forward = list(x,y,z)
OR client.sound_fx/y/z = x/y/z
Same for sound_up/velocity
In addition to, or alternatively:
client.sound_flags = SOUND_ATTACH_MOB | SOUND_ATTACH_EYE | SOUND_ATTACH_VELOCITY | SOUND_HEADRELATIVE | SOUND_WORLDRELATIVE | SOUND_INVERSEROLLOFF | SOUND_LINEARROLLOFF | SOUND_LINEARSQUAREROLLOFF

ATTACH_MOB attaches the sound position to the client mob position. ATTACH_EYE does the same, but for the eye instead. If omitted, either defaults to the default behavior OR client.sound_pos/x/y/z. ATTACH_VELOCITY updates the velocity based on the attached EYE/MOBs movement speed. The remaining flags set the FMOD_MODE for sounds that are played after the flag assignment.
--
Ultimate desire: Effectively 0 server cost for adjusting the panning based on mob location.
+ 1
Also it would be great to add a possibility to get sound datum duration not only from client, but right after sound creation(if it is even possible)
Most game engines support positional audio by having "audio sources" be objects in world space, and the client/camera as an "audio listener", also in world space. Definitely should just go with that, which can technically already be done via constant updates to all sounds for all clients, but surely that work could be offloaded.
In response to Kaiochao
Kaiochao wrote:
Most game engines support positional audio by having "audio sources" be objects in world space, and the client/camera as an "audio listener", also in world space.

Definitely should just go with that
In response to Kaiochao
Kaiochao wrote:
Most game engines support positional audio by having "audio sources" be objects in world space, and the client/camera as an "audio listener", also in world space.

+1