Search found 8 matches

by Nada3
Thu Dec 29, 2016 10:41 am
Forum: General
Topic: Move an object from a point A to a point B
Replies: 8
Views: 6976

Re: Move an object from a point A to a point B

Thank's a lot for you answers !
I will use the code pgimeno I thin :-).
by Nada3
Wed Dec 28, 2016 7:54 pm
Forum: General
Topic: Move an object from a point A to a point B
Replies: 8
Views: 6976

Re: Move an object from a point A to a point B

By move, I mean go there with a constant speed.
by Nada3
Wed Dec 28, 2016 7:13 pm
Forum: General
Topic: Move an object from a point A to a point B
Replies: 8
Views: 6976

Move an object from a point A to a point B

Hello everyone ! I have a new problem and I don't know how to solve it :/ I want to move an object (an image) from a position to a second position (mouse cursor) when I click. But I don't know how to do. I've searched a math solution but I don't find something interesting. Hope you can help me ! Tha...
by Nada3
Fri Dec 23, 2016 2:02 pm
Forum: General
Topic: Rotate an image itself to cursor
Replies: 11
Views: 7194

Re: Rotate an image itself to cursor

My apologize it's work fine for me, sorry for inconvenience.
Thank's you :)
by Nada3
Fri Dec 23, 2016 12:40 pm
Forum: General
Topic: Rotate an image itself to cursor
Replies: 11
Views: 7194

Re: Rotate an image itself to cursor

I think I understand but it's update nothing :'( My code: function love.load() t = { source = love.graphics.newImage('triangle.png'), x = 800 / 2, y = 600 / 2, r = 0, sx = 0, sy = 0, } t.sx = 50 / t.source:getWidth() t.sy = 50 / t.source:getHeight() end function love.update(dt) local mx, my = love.m...
by Nada3
Fri Dec 23, 2016 12:29 pm
Forum: General
Topic: Rotate an image itself to cursor
Replies: 11
Views: 7194

Re: Rotate an image itself to cursor

Hum, I already knew this too, with this operation my image don't rotate on itself she rotates around a point, you know I want to get something like this:
http://www.gamefromscratch.com/download ... oward.html
by Nada3
Fri Dec 23, 2016 12:07 pm
Forum: General
Topic: Rotate an image itself to cursor
Replies: 11
Views: 7194

Re: Rotate an image itself to cursor

Thank's for the answer I already know it's possible to use the angle argument in love.graphics.draw function but I don't know how to calculate the angle :/
by Nada3
Fri Dec 23, 2016 10:56 am
Forum: General
Topic: Rotate an image itself to cursor
Replies: 11
Views: 7194

Rotate an image itself to cursor

Hi everybody, I want to create a minigame with Love2d but I've a problem:
I don't know how to rotate an image (itself) to the mouse cursor. I've read some articles on 'how to rotate an to cursor' but it's not rotating the image itself.
Thank's for your answer !