0
0

Is there a way in code (given an Event *) to check if it is 2D or 3D? I’d like to add some checks so that sounds we expect to be 2d in code (like the UI) are correctly setup in data.

There doesn’t seem to be any references in the documentation.

get3DAttributes() seems to return FMOD_OK even if the event is 2D.

  • You must to post comments
0
0

What I do is get the event’s channels, then use this:

[code:1gl9yon0]
UBOOL ThreeD = TRUE;
result = FMOD_Channel_Get3DAttributes(channel, &lastPos, &lastVel);
if (result == FMOD_ERR_NEEDS3D)
ThreeD = FALSE;
[/code:1gl9yon0]

  • You must to post comments
0
0

Thank for the tip.

What I want to do is warn about this error at startup, so I don’t have a channel. Any other suggestions would be appreciated! :)

  • You must to post comments
0
0

How about using

FMOD_RESULT Event::getPropertyByIndex(
int propertyindex,
void * value,
bool this_instance
);

With FMOD_EVENTPROPERTY_MODE, returns FMOD_MODE, which is either FMOD_3D or FMOD_2D.

I’ve not tried it, but I was just having a dig around the docs

  • You must to post comments
0
0

Yep, we use the getproperty function and it works, we use it to stop our 3d positioning and occlusion being done on 2d events.

  • You must to post comments
0
0

The getPropertyByIndex seems to work a treat. Thanks everyone!

  • You must to post comments
Showing 5 results
Your Answer

Please first to submit.