0
0

Can I do this;
[code:20ux66ph]
static FMOD_VECTOR p, v, d;
if(pos != NULL){ SUtils::toFMODV(pos, p); event->set3DAttributes(&p, NULL, NULL);}
if(vel != NULL){ SUtils::toFMODV(
vel, v); event->set3DAttributes(NULL, &v, NULL);} //ASSUMPT: NULL params != resetting previous values.
if(dir != NULL){ SUtils::toFMODV(dir->normalisedCopy(), d); event->set3DAttributes(NULL, NULL, &d);}

[/code:20ux66ph]
Or should I do:
[code:20ux66ph]
[...]
event->set3DAttributes((pos)?&p:NULL, (vel)?&v:NULL, (dir)?&d:NULL);
[/code:20ux66ph]

  • You must to post comments
0
0

your first case will work. null = ignore, not reset.

  • You must to post comments
Showing 1 result
Your Answer

Please first to submit.