   openal sound direction
  Hiin a loop I try to set the AL_DIRECTION:    SourcesDir[1][0] = 0.0; //pX;    SourcesDir[1][1] = 0.0; //pY - 20;    SourcesDir[1][2] = 1.0;//pZ + 2 alSourcefv (Sources[j], AL_DIRECTION, SourcesDir[j])now I only have a int for degrees (1-360). I don't understand how i should use the int to set the AL_DIRECTION. Or am i completely wrong?Many thanksMichael   
Polar coordinates ;)   ;  i don't understand what should go into those?SourcesDir[1][0] = 0.0; //pX;SourcesDir[1][1] = 0.0; //pY - 20;SourcesDir[1][2] = 1.0;//pZ + 2A int between 0-1? is X for rotation? so the first?Thanks   ;  I guess you are new to 3d things. Have a look at http://www.flipcode.com/geometry/, there's an article "Introduction to Vector Math".To enlighten you for the moment, those are 3d vectors. They describe the direction of the sound-source in 3d-space, and the components usually range from [-1..+1]. But have a look at the articles for an understanding of vector math.One of the three components describes if the sound is before or behind you, or anything in between, by setting it to something from [-1..+1]. The other describes whether it's on the left or on the right, or something in between. The other is for up+down, but I think such sound-systems are less common.   ;  HiI know vectors but:  alGetSourcei(Sources[1], AL_SOURCE_STATE, &state);  if(state != AL_PLAYING)  { SourcesPos[1][0] = (pX+0.3)*dx;//float(cos(heading));//0.0; //pX; SourcesPos[1][1] = pY+0.2;//0.0; //pY - 20; SourcesPos[1][2] = pZ+0.6;//float(sin(heading));//0.0;//pZ + 2 SourcesVel[1][0] = 0.0; //pX; SourcesVel[1][1] = 0.0; //pY - 20; SourcesVel[1][2] = 0.0;//pZ + 2 SourcesDir[1][0] = 0.0; //pX; SourcesDir[1][1] = 0.0; //pY - 20; SourcesDir[1][2] = 1.0;//pZ + 2 alSourcefv(Sources[1], AL_POSITION, SourcesPos[1]); alSourcefv(Sources[1], AL_VELOCITY, SourcesVel[1]); alSourcefv (Sources[1], AL_DIRECTION, SourcesDir[1]); alSourcePlay(Sources[1]);}etc. for all sources.What could I be doing wrong? Listener is fine, but not moving the source position.Many thanks and regardsMichael[Edited by - mike4linux on May 24, 2010 6:31:15 AM];  Ok now alike that is working. The problem is that I should move both sounds to the right. Then one nearer then the second. so far fine but of course while turning it gets messed up.How can i turn 2 sounds with different positions?Many thanksMichael-----    double theta = (double) heading * 3.14 / 180.0;    SourcesPos[0] = -float(cos(theta));    SourcesPos[1] = -float(rand()%2);    SourcesPos[2] = -float(sin(theta))