trig and angles in the computer world?

BlitzMax Forums/BlitzMax Beginners Area/trig and angles in the computer world?

mudcat(Posted 2005) [#1]
I have a line drawn at the bottom of my screen,I shoot a canon ball from the right side.When it hits the bottom screen,I want it to bounce.My problem is the angles.What is the angle if the ball is dropped straight down?How about 45 degrees in the real world,what is it in our world?I've done the tan2 demos but the angles are neg,and can't seem to relate it to the real world.

Thanks,
mudcat


Big&(Posted 2005) [#2]
If you are moving your cannon ball with just x and y acceleration then you just negate the y acceleration:

yacceleration = -yacceleration

If you are moving your cannon ball with an angle and speed then to get the bounce:

angle = ( 90 - angle ) + 90

Hope I understood you correctly.


EOF(Posted 2005) [#3]
Something like this?


Example

* Move MOUSE to change distance/height
* LMB/RMB changes cannonball speed