4.23 - macOS 10.15 - iOS 13.1.2
Using the UE’s AR template as a base, I’ve created a slightly more capable version of the app that can place various skeletal meshes, some animated, some with attached sound, in the AR space. I’m a beginner and this is a learning exercise as well as a simple demonstration of where this experimental AR approach could lead in the context of scenic arts.
In this app you can choose a skeletal mesh from a list, attach or not a looping soundwave to it and place it in the AR space around you. The soundwave is one of a few different options that all have the same predefined attenuation settings. If chosen the sound will play from the placed object with falloff radius settings of 20 to 200. That works fine.
Once an object is placed, you can touch/select it and change its material picking from a menu offering a few options. You can scale, translate, rotate and delete it (in which case the attached sound stops as well). That’s all good too.
I can’t change the attenuation parameters from their initial settings, though. I use a global variable defined in a game instance as I do for other parameters. The script compiles without errors. But, the variable doesn’t keep the modified value and the sound doesn’t change. Except if I add a play node at the end. That forces the new attenuation outer limit to change once but that new value isn’t stored in the global variable despite using the appropriate set node after changing the value. Each new iteration brings back the attenuation values by default as if the variable couldn’t be changed.
Also, with the play node added, the soundwave will stop looping and it won’t stop playing until it reaches its end if the object is deleted from the AR space. As if it was dissociated from the skeletal mesh you initially attached it to.
In order to access the attenuation settings of the already playing/looping sound, I have to convert the soundwave pointed in a global variable with a Create Sound 2D node. I can’t access the attenuation settings otherwise.
I suspect that I’m simply missing some basic concept here.