After weeks, I’ve finally cracked how to receive the location of a static object (currently the ever colourful cube) where an audio source will come from.
The problem was Max/MSP wasn’t updating the location of it when launching the patch, this was because Unity 3D wasn’t sending it any information (it was set to only do so if the object was sleeping, and it only sleeps if its been awake).
I tried waking it up manually, resulting in a horrible mess of jaggery audio (it’s the same script to find the position of the player).
I tried just continuously getting location data, pointless CPU usage and more player position errors.
I tried many other things, non of which worked.
“IT NEEDS TO MOVE. IF ONLY IT MOVED”
…Well move it? I tried, or at least I thought I did. I tried using gravity, to fast and unpredictable. There was no way I could have Unity 3D run the objects movement, because its unstable as I can’t control when people open up the Max/MSP created application. So I ruled out moving it as a possibility.
Then I looked at the basic Max/MSP patch I started the project with. I send it a continuous rotate message. Wait a minute, I sent it a rotate message.
I altered the patch to only rotate the object once, by 0.1. It worked, I could now get the object’s position, which for all intents and purposes of this project hasn’t moved (certainly not enough for any minor changes).