Angle/Mouse Coords
Blitz3D Forums/Blitz3D Programming/Angle/Mouse Coords ???
Im still working on it...:D
If you want to find the angle from the mouse to the screen centre, it's:
ATan2((GraphicsHeight()/2)-MouseY(),(GraphicsWidth()/2)-MouseX())
ATan2((GraphicsHeight()/2)-MouseY(),(GraphicsWidth()/2)-MouseX())
Can someone give me a quick explanation of what values the Sin,Cos,Tan,ASin,ACos,ATan,ATan2 return.
Trig Functions explained here
Sector is 1 through 8, as shown:
sector=Floor(ATan2(MouseX()-GraphicsWidth()/2,GraphicsHeight()/2-MouseY())/45)
Sector is 1 through 8, as shown:
\ 3|2 / <u>4 \|/ 1</u> 5 /|\ 8 / 6|7 \
Kip I'll work on this tomorrow. Solving stuff like this interests me.
Right off hand, number each triangle 1 through 8.
Right off hand, number each triangle 1 through 8.
Or just use my intriangle function in the code archives
