use mouse to move things around

Questions about the LÖVE API, installing LÖVE and other support related questions go here.
Forum rules
Before you make a thread asking for help, read this.
User avatar
Robin
The Omniscient
Posts: 6506
Joined: Fri Feb 20, 2009 4:29 pm
Location: The Netherlands
Contact:

Re: use mouse to move things around

Post by Robin »

love.mouse.isDown() has semantically no place in love.draw() (although technically it doesn't matter).

Also: love.draw() is called to draw things. If the mouse button isn't down, nothing is drawn.
This would work:

Code: Select all

function love.draw()
    love.graphics.circle("fill", planet1.body:getX(), planet1.body:getY(), planet1_RADIUS)
end
But it might not be what you want. Unfortunately, I'm not sure what that is. ;)
Help us help you: attach a .love.
Xoria
Citizen
Posts: 61
Joined: Sun Jan 31, 2010 1:24 am

Re: use mouse to move things around

Post by Xoria »

How do you attach images?
User avatar
Robin
The Omniscient
Posts: 6506
Joined: Fri Feb 20, 2009 4:29 pm
Location: The Netherlands
Contact:

Re: use mouse to move things around

Post by Robin »

Under the text box, "Upload attachment".
Help us help you: attach a .love.
User avatar
TechnoCat
Inner party member
Posts: 1612
Joined: Thu Jul 30, 2009 12:31 am
Location: Milwaukee, WI
Contact:

Re: use mouse to move things around

Post by TechnoCat »

I think he wants to attach an image to his object.
something like love.graphics.draw(Image, getX(), getY()) --This code will not work unmodified.
Xoria
Citizen
Posts: 61
Joined: Sun Jan 31, 2010 1:24 am

Re: use mouse to move things around

Post by Xoria »

Thanks. Probably this is the most help forum lol.
Post Reply

Who is online

Users browsing this forum: Ahrefs [Bot] and 5 guests