Search code examples
love2d

Love2d: stand on Detection


I just wanna know if there is some kind a way for stand on detection

if love.keyboard.isDown("up") then
fplayer.body:applyForce(0,-1000)
end

So maybe like

if (love.keyboard.isDown("up") and isonground==true) then

Solution

  • This completly depends on the way you do your collision detection. "Stand on" is a very certain relation between two objects that you have to cover in your collision detection code. So you might want to choose a collision detection solution and for that specific library.