I’m working on a very simple attempt to integrate fmod with my dots project. Ive got events playing via guid, but it doesnt seem like I’m able to update the 3d attributes using
instance.set3DAttributes()
foreach (var (localTransform, localToWorld, fmodSourceData, entity) in SystemAPI.Query<LocalTransform, LocalToWorld, RefRW<FMODEmitter>>().WithAll<FMODUpdate>().WithEntityAccess())
{
if (!instance.isValid())
{
instance.clearHandle();
return;
}
if (instance.isValid())
{
instance.getPlaybackState(out var playbackState);
if(playbackState == FMOD.Studio.PLAYBACK_STATE.STOPPED)
return;
}
fmodSourceData.ValueRW.PreviousLocalToWorld = localToWorld;
var incomingAttributes = To3DAttributes(localToWorld);
instance.set3DAttributes(incomingAttributes);
instance.get3DAttributes(out var attributes);
Debug.Log(new float3(attributes.position.x,attributes.position.y,attributes.position.z) + " -vs- " + new float3(incomingAttributes.position.x,incomingAttributes.position.y,incomingAttributes.position.z));
}
using get3DAttributes, the values are always the same as the initial setting of them when the instance is started, but never changes after that.