I’m having a problem where sound is coming out of the wrong side depending upon which direction the camera is facing. If the camera is looking along the y-axis, sound is played on the same side that the source is; however, if I look along the x-axis and stand next to the source, the sound comes out of the opposite side (i.e. if the source is to the right of the camera, the sound comes out of the left speaker). Maybe it has to do with the way I change the camera angle? It’s a first person shooter, so I’m using the mouse to change the looking direction by changing the HPR.
md = base.win.getPointer(0)
x = md.getX()
y = md.getY()
deltaX = md.getX() - self.centerX
deltaY = md.getY() - self.centerY
newYaw = base.camera.getH() - 0.1* deltaX*self.mouseSensitivity
newPitch = base.camera.getP() - 0.09* deltaY*self.mouseSensitivity
if(newPitch > 80):
newPitch = 80
if(newPitch < -80):
newPitch = -80
base.camera.setH(newYaw)
base.camera.setP(newPitch)
Any thoughts?