Re: DT in BGT
So until I figure out what the hell to do about getting theta to pass and change correctly, preferably without making math a class, I decided to test whether theta would control the direction correctly. Which brings me to the following question: What...the...fuck? Radian values should be immutable. In other words:
if 90 degrees = 1.5707963268 radians, and knowing that position = velocity*DT:
double theta = 1.5707963268;
vector vel((acc.x/M2)*cosine(theta), (acc.y/M2)*sine(theta), grav.z);
This should make the ball travel 90 degrees. That would mean that it would travel strictly on the x axis, and none on y, meaning that Y should remain 0. However, this is what the log shows the travel to be. I've only shown the first 5 entries, but you will see what I mean:
position of ball.x is -0.000000000019894, position of ball.y is 3.8982412815094.
position of ball.x is -0.000000000039591, position of ball.y is 7.757
90357589722.
position of ball.x is -0.000000000059289, position of ball.y is 11.6175222396851.
position of ball.x is -0.000000000078986, position of ball.y is 15.4771375656128.
position of ball.x is -0.000000000098684, position of ball.y is 19.3368358612061.
I see two problems here. First of all, the ball is travelling along the Y axis instead of the X one, meaning that it's going straight ahead. Last time I checked, that's not 90 degrees. Second of all, the ball is moving very, very, very slowly along the X axis, but apparently in the wrong direction, as the numbers are negative, which would mean the ball is moving to the left. Again, not 90 degrees. And I know that my math is correct. I doubt very seriously that every website showing the value of 1.5707963268 radians is that mathematically fucked up. And I just verified it with a calculator. So, again, my question is, what...the...fuck?
_______________________________________________ Audiogames-reflector mailing list Audiogames-reflector@sabahattin-gucukoglu.com https://sabahattin-gucukoglu.com/cgi-bin/mailman/listinfo/audiogames-reflector