Search found 5 matches

by VirusX
Mon Jun 02, 2014 7:17 pm
Forum: Support and Development
Topic: Problem with atan2
Replies: 8
Views: 4094

Re: Problem with atan2

Hi, Well, I guess I am getting rusty. There is been a long time I have played with LÖVE, and I forgot another minor detail. Added to the fact that y coordinates are flipped upside down, rotation is clockwise, and I was assuming it was anti-clockwise. This should hopefully work. :awesome: function l...
by VirusX
Mon Jun 02, 2014 5:58 pm
Forum: Support and Development
Topic: Problem with atan2
Replies: 8
Views: 4094

Re: Problem with atan2

My bad. Just use the return value of math.atan2(dy, dx) straight as the rotation argument to love.graphics.draw. function lookAt2(obj, target) local dx = target.x - obj.x local dy = -(target.y - obj.y) -- same as obj.y - target.y return math.atan2(dy, dx) --return rad < 0 and rad + math.pi*2 or rad...
by VirusX
Mon Jun 02, 2014 5:15 pm
Forum: Support and Development
Topic: Problem with atan2
Replies: 8
Views: 4094

Re: Problem with atan2

It may not work 100%, but where I used it it worked fine. I hope I helped! In your code you use math.offset which is afaik not Lua builtin function? Can you let me know what it does. JUst wanted to point out something. Love system coordinates is not the same as the one assumed in a classical euclid...
by VirusX
Mon Jun 02, 2014 2:57 pm
Forum: Support and Development
Topic: Problem with atan2
Replies: 8
Views: 4094

Problem with atan2

I'm having bit of a problem with atan2. Scratching my head for last couple days and can't understand why it does not work. I need simple lookAt() function which I found here in forums, but it works arseways for me ): I have two actors. First actor1 should look at actor2. I also added two white lines...
by VirusX
Sat May 17, 2014 8:46 pm
Forum: General
Topic: Distributing binaries (again)
Replies: 7
Views: 2987

Distributing binaries (again)

Friendly greetings (: I just started using Love2D (still playing with bubble wrap) but so far I LÖVE it. I just read wiki page about distributing games and to me it looks like we are distributing game with a source code (well at least Mac version). So I did quick search in forum and found some old t...