Search found 3 matches
- Mon Apr 29, 2013 10:04 pm
- Forum: Support and Development
- Topic: Rectangle Collision Function Help
- Replies: 3
- Views: 2236
Rectangle Collision Function Help
Hello so I am making a game where you eat smaller fish to grow larger to eat bigger fish and so I need a way for the player to collide with fish. I tried to make myself a collision function but it doesn't work. Can someone show me a rectangle collision function? My collision function: function playe...
- Sat Apr 27, 2013 5:10 pm
- Forum: Support and Development
- Topic: Centering Images Perfectly
- Replies: 4
- Views: 5071
Re: Centering Images Perfectly
how do you change the scale then?
Edit: Nevermind but new problem now the fish isn't in sync with the camera am i doing something wrong with the camera? New code below.
Edit: Nevermind but new problem now the fish isn't in sync with the camera am i doing something wrong with the camera? New code below.
- Sat Apr 27, 2013 1:50 pm
- Forum: Support and Development
- Topic: Centering Images Perfectly
- Replies: 4
- Views: 5071
Centering Images Perfectly
So I have an image that needs to change in scale but stay perfectly in the center my first thought of this would be: self.x = math.floor(love.graphics.getWidth()/2) - math.floor(image:getWidth()/2) but that doesn't look centered and it doesn't take into account scaling. Thank you for your time .love...