Since I was getting confused as to where angles start in Love2D (FlashPunk starts on the opposite side to Love2D), I made this utility which shows the 0 degree point, and the direction angles travel in. It also shows the angle from the centre of the screen to the mouse.
So, for future reference: angles start on rightmost side of a circle, and travel clockwise.
I had lots of experience with clockwise angle system (Flash and it's programming language [AS 3.0] does use the video coordinate system, aka, those with Y values increasing downwards) .
Good work getting this far, future starter! That said, if you are simple-minded, old, or irradiated in such a way that the future should not start with you, please return to your primitive tribe and send back someone better-qualified for testing.
substitute541 wrote:I had lots of experience with clockwise angle system (Flash and it's programming language [AS 3.0] does use the video coordinate system, aka, those with Y values increasing downwards) .
Clockwise appears to be the norm. Flash and Love2D use it, but Flash, at least with FlashPunk, uses angles that at the left side of the circle. Also, Love2D uses the same coordinate system.
YeOleBluegrass wrote:Very useful, I've added to my "must have" list
Aha, this could be useful to people like me who suck at maths!
Great work, appropriately titled
Do you recognise when the world won't stop for you? Or when the days don't care what you've got to do? When the weight's too tough to lift up, what do you? Don't let them choose for you, that's on you.
BlackBulletIV wrote:Also, wow, it's been downloaded 77 times already. :O
Because it's clean, clear and very useful !
EDIT :
i suggest you replace this line
moveAngle = (moveAngle + math.pi * dt) % (math.pi * 2)
by this one
moveAngle = (moveAngle + dt) % (math.pi * 2)
and this one
love.graphics.print("Purple line is 0 degrees/radians\nRed line shows the direction angles move in (clockwise)\nHold shift to snap mouse to increments of 10 degrees", 5, 5)
by this one
love.graphics.print("Purple line is 0 degrees/radians\nRed line shows the direction angles move in (clockwise)\nHold shift to snap mouse to increments of "..snapDegrees.." degrees", 5, 5)
Last edited by Saegor on Sun Nov 18, 2012 1:34 pm, edited 1 time in total.