How I can use breezefiled callback collisions for platformer

Questions about the LÖVE API, installing LÖVE and other support related questions go here.
Forum rules
Before you make a thread asking for help, read this.
Post Reply
User avatar
Catzonic
Prole
Posts: 5
Joined: Sat Feb 18, 2023 5:53 am
Contact:

How I can use breezefiled callback collisions for platformer

Post by Catzonic »

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

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
Attachments
Project Luea V0.0.rar
(21.84 KiB) Downloaded 71 times
Post Reply

Who is online

Users browsing this forum: No registered users and 78 guests