Answer the question
In order to leave comments, you need to log in
How to make a diagonal line collision in Love2d?
with a straight line that is perpendicular to the coordinate grid, everything is simple, I do it like this
if object.x + object.w >= col[i][1] then
if object.x <= col[i][2] then
if object.y + object.h >= col[i][3] then
if object.y + object.h <= col[i][3] + 8 then
object.y = col[i][3] - object.h
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question