Page 1 of 1
Angle visualiser thing
Posted: Tue Nov 13, 2012 12:58 am
by BlackBulletIV
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.
Re: Angle visualiser thing
Posted: Tue Nov 13, 2012 2:50 am
by substitute541
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) .
Re: Angle visualiser thing
Posted: Tue Nov 13, 2012 2:06 pm
by YeOleBluegrass
Very useful, I've added to my "must have" list
Thank you!
Re: Angle visualiser thing
Posted: Thu Nov 15, 2012 1:03 am
by BlackBulletIV
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
Thank you!
Glad you found it useful.
Re: Angle visualiser thing
Posted: Thu Nov 15, 2012 10:47 pm
by Lafolie
Aha, this could be useful to people like me who suck at maths!
Great work, appropriately titled
Re: Angle visualiser thing
Posted: Fri Nov 16, 2012 2:52 am
by Helvecta
Re: Angle visualiser thing
Posted: Sat Nov 17, 2012 10:32 am
by BlackBulletIV
You mean that thumb stick thing at the bottom-left? I suppose they have some similarities.
Also, wow, it's been downloaded 77 times already. :O
Re: Angle visualiser thing
Posted: Sat Nov 17, 2012 11:57 am
by Saegor
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)
Re: Angle visualiser thing
Posted: Sat Nov 17, 2012 11:35 pm
by BlackBulletIV
Saegor wrote:BlackBulletIV wrote:Also, wow, it's been downloaded 77 times already. :O
Because it's clean, clear and very useful !
Good to know.
I've added a screenshot to the main post.
Re: Angle visualiser thing
Posted: Tue Nov 20, 2012 11:31 am
by Saegor
i used your .love to make my own tutorial-like visualiser thing
i share it here, enjöy !
EDIT : arrows keys to turn/move