Re: Updated includes for BGT (includes bgt2py and 1st person sound pool)

@Cae,
I've got a couple of questions about your math code.  First, are you using theta as the angle of elevation in the code, or are you using theta to represent degrees as degrees?  ?  From what I understand, unless I am reading incorrectly, if R is the distance from origin to point, theta is the measure of the angle of elevation, and phi is the azimuth angle, such that theta is equal to arcos(z/R).  Why do you have the circular degrees in arrays?  Does it need to be like that for BGT to calculate correctly, or does it give an advantage that I'm just not seeing?  Why wouldn't something like this work as well?

double deg;
double rads;
double theta;

//convert degrees to radians, adjusting to use the 12-o'clock system due to the way sounds are handled in the programming language.
double DTR(double deg)
{
return rads = (90-deg)*pi/180;
}
To get the value of r:

double GetDist(vector v1, vector v2)
{
double r;
v.x = v1.x - v2.x;
v.y = v1.y - v2.y;
v.z = v1.z - v2.z;
return R = square_root(power(v.x,2)+power(v.y,2)+power(v.z,2));
}
Then, to get theta:

double theta(pos.z, r)
{
return theta = DTR(arc_cosine(pos.z/r));
}
Wouldn't that work as well, without putting the degrees into arrays?  Or is there something in BGT that makes the arrays necessary?  Just curious.

-- 
Audiogames-reflector mailing list
Audiogames-reflector@sabahattin-gucukoglu.com
https://sabahattin-gucukoglu.com/cgi-bin/mailman/listinfo/audiogames-reflector
  • ... AudioGames . net Forum — Developers room : JLove via Audiogames-reflector
    • ... AudioGames . net Forum — Developers room : CAE_Jones via Audiogames-reflector
    • ... AudioGames . net Forum — Developers room : CAE_Jones via Audiogames-reflector
    • ... AudioGames . net Forum — Developers room : mahdi-abedi via Audiogames-reflector
    • ... AudioGames . net Forum — Developers room : JLove via Audiogames-reflector
    • ... AudioGames . net Forum — Developers room : JLove via Audiogames-reflector
    • ... AudioGames . net Forum — Developers room : JLove via Audiogames-reflector
    • ... AudioGames . net Forum — Developers room : JLove via Audiogames-reflector
    • ... AudioGames . net Forum — Developers room : JLove via Audiogames-reflector
    • ... AudioGames . net Forum — Developers room : CAE_Jones via Audiogames-reflector
    • ... AudioGames . net Forum — Developers room : JLove via Audiogames-reflector

Reply via email to