Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

DarkBASIC Professional Discussion / Rotate Listener - doesn't rotate the same way as objects?

Author
Message
STE
22
Years of Service
User Offline
Joined: 7th Oct 2003
Location:
Posted: 28th Oct 2003 18:08
I have a 3D space, with a listener at Position X,Y & Z and a sound at Position X,Y & Z. I have no problem with this bit.

My Listener object can change their X & Y angles from 0 to 360. But I never change the Z axis Angle.
But I cannot for the life of me get the sound to work properly, it is as if Rotate Listener X also effects the Y angle, and Y also effects X.

For example.
If Listener object XAngle=90 & Listener object YAngle=90 then I set : rotate listener 90,90,0.
But the sound comes out on my LEFT speakers, when the noise making object is in-front of the listener object.

I strongly suspect that I need to change the angles I send into the rotate listener command to offset this, but I cannot work out what exactly. I thought I had it sussed, then I tried my listener object at XAngle=45, YAngle=180 the sound was incorrect again.

Has anyone got 3d sound to work properly?

STE ;¬!
BatVink
Moderator
23
Years of Service
User Offline
Joined: 4th Apr 2003
Location: Gods own County, UK
Posted: 29th Oct 2003 10:27
Sounds correct to me.

Think of the world coordinate system. If you rotate the listener 90 degrees on the x-axis, it points up. Still using the same axis, 90 degrees on the Y-axis now points it to the right. So it's now pointing up and to the right.

If you put your object in front using the World coordinates again, at x=0,Y=0, Z=100 (or whatever is suitable), it's on the left of your listener object.

BatVink (formerly StevieVee)
http://facepaint.me.uk/catalog/default.php
STE
22
Years of Service
User Offline
Joined: 7th Oct 2003
Location:
Posted: 29th Oct 2003 12:20
I don't deny there is a certain logic to it.

But normal object rotation doesn't work that way, which makes the 2 different systems rather difficult to actually work together. Which means incorrect 3d sound. Which is suddenly not so logical after all.

STE ;¬!

Login to post a reply

Server time is: 2026-07-26 16:54:43
Your offset time is: 2026-07-26 16:54:43