FTFYJeeper wrote:The variable vy (Vertical Velocity in this case) determines the vertical direction and speedof the ball. When the ball collides with the paddle it checks where on the paddle it has collided; the higher up the collision was the lower it sets the velocity, the lower the collision was the higher it sets the velocity.nice wrote:
Could you explain further what it does? personally I don't really know what's happening
General discussion about LÖVE, Lua, game development, puns, and unicorns.
Rukiri wrote:Instead of making multi hitboxes just conver rad to deg and using arctan2.(not lua) but lua should have radtodeg and arctan2 functions.
Code: Select all
degree = math.deg(math.atan2(vec1.y - vec2.y, vec2.x - vec1.x))
Users browsing this forum: Bing [Bot] and 22 guests