Search found 2 matches
- Mon Jan 06, 2020 9:15 am
- Forum: General
- Topic: How do I center an image when moving
- Replies: 3
- Views: 6543
Re: How do I center an image when moving
I've added to my code and it looks like this function love.load() peng = love.graphics.newImage("peng.png") peng_x = 150 peng_y = 150 mouse_x, mouse_y = 150,150 music = love.audio.newSource("cp-coffee.mp3", "stream") back = love.graphics.newImage("room.png") e...
- Sun Jan 05, 2020 8:55 pm
- Forum: General
- Topic: How do I center an image when moving
- Replies: 3
- Views: 6543
How do I center an image when moving
this is my code and I'm currently when I click somewhere on the screen it causes the top left-hand corner of the peng.png image to where the mouse pointer clicked when I want the bottom middle to go to where the screen was clicked, can anyone help? function love.load() peng = love.graphics.newImage(...