How I can use breezefiled callback collisions for platformer
Posted: Thu Dec 28, 2023 3:05 pm
Hi there I was making a platformer for my game and I was using breezefiled library for physics
I having a problem in callback function for collision dectection I was trying to check ground with player and solid tiles
in PLayer.lua line 34 I was attempt to use enter and exit function together
I was bit confused who I have to use these callback
I was new in Love2d so therer some few problem going on
I having a problem in callback function for collision dectection I was trying to check ground with player and solid tiles
in PLayer.lua line 34 I was attempt to use enter and exit function together
Code: Select all
function Player:checkColl(other)
function self.collision:enter(other)
if other == tile then
self.isGround = true
self.yVel = 0
end
end
function self.collision:exit(other)
if other == tile then
self.isGround = false
end
end
self.collision:enter(other)
self.collision:exit(other)
end
I was bit confused who I have to use these callback
I was new in Love2d so therer some few problem going on