Search found 84 matches
- Sun Dec 17, 2017 6:11 pm
- Forum: Support and Development
- Topic: rotation question
- Replies: 20
- Views: 12634
Re: rotation question
I did type this in blind... Um, just look at the logic at the end of love.draw() , its in that area!
- Sun Dec 17, 2017 5:54 pm
- Forum: Support and Development
- Topic: rotation question
- Replies: 20
- Views: 12634
Re: rotation question
Here you go, quick and dirty: function love.load() love.mouse.setVisible(false) lAngle = -90 dAngle = 0 end function love.draw() love.graphics.setColor(255, 255, 255, 255) love.graphics.ellipse("fill", mX, mY, 4, 4) love.graphics.ellipse("fill", 400, 200, 10, 10) love.graphics.se...
- Sun Dec 17, 2017 5:26 pm
- Forum: Support and Development
- Topic: rotation question
- Replies: 20
- Views: 12634
Re: rotation question
atan2 takes (y, x)
- Sun Dec 17, 2017 4:54 pm
- Forum: Support and Development
- Topic: rotation question
- Replies: 20
- Views: 12634
Re: rotation question
Does it rotate the 'long way round' when your mouse is any quadrant? Sounds to me like you just need to get the signs right depending upon which quadrant the cursor is in. If you look at the output of atan2 using something like this you'll see what's required: radius = 100 for i = 0, 359 do x = radi...
- Sun Dec 17, 2017 4:31 pm
- Forum: Support and Development
- Topic: rotation question
- Replies: 20
- Views: 12634
Re: rotation question
As I said before, atan2 will help you fix the issue - here's a good explanation: https://gamedev.stackexchange.com/quest ... f-a-vector
EDIT: I see what your diagram is driving at now, but the way to solve it is still with atan2
EDIT: I see what your diagram is driving at now, but the way to solve it is still with atan2
- Sun Dec 17, 2017 7:46 am
- Forum: Games and Creations
- Topic: "On the roof": my first platformer game
- Replies: 1
- Views: 2548
Re: "On the roof": my first platformer game
Did I use the word indulgent when I was 11? If you are and this is all your own work then well done on both counts. Because of the weird gravity, there's no clue as to how high and far you can jump which is a bit frustrating. You can also cling onto a wall by holding 'right' and 'up' but then have n...
- Sun Dec 17, 2017 7:07 am
- Forum: Support and Development
- Topic: rotation question
- Replies: 20
- Views: 12634
Re: rotation question
Perhaps look into atan2 (https://love2d.org/wiki/General_math)? I think you can then work out which way is the shortest, rather than always going the long way round
- Thu Nov 30, 2017 7:58 pm
- Forum: General
- Topic: Ludum Dare 40
- Replies: 5
- Views: 5265
Re: Ludum Dare 40
Aww, haven't entered since #36, want to jam but 25% of my weekend is already accounted for :( Ah well, maybe I can do a 60 hour jam instead :D I think some of the final themes are a bit naff - can't see 3,000 different games coming out of a theme like 'floating islands' - but some of them sound epic...
- Fri Nov 10, 2017 5:26 pm
- Forum: Libraries and Tools
- Topic: FÖNTGen makes pretty fonts
- Replies: 17
- Views: 13277
Re: FÖNTGen makes pretty fonts
Double-click to start does now work on my Linux box :D Two more little points... 1 Is it worth having numerical values change when mouse button is held down on triangle thingies? 2 I set a stroke value of 6 as a test and there's a gap between the character and the stroke: Screenshot at 2017-11-10 17...
- Fri Nov 10, 2017 8:26 am
- Forum: Libraries and Tools
- Topic: FÖNTGen makes pretty fonts
- Replies: 17
- Views: 13277
Re: FÖNTGen makes pretty fonts
I've just noticed, you said:
Which is what I was suggesting but I don't see any numbers (maybe I'm just being dim as usual).... and you can even click on the numbers and edit them manually