Making a library, not quite there yet [HitBoxes]

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
LuaCre
Prole
Posts: 5
Joined: Mon Dec 03, 2018 11:21 am

Making a library, not quite there yet [HitBoxes]

Post by LuaCre » Wed Dec 05, 2018 11:02 pm

Hey, I need help, I have this library for object collision, right now it makes Boxes with a function
Boxes have these properties

x = x position
x2 = max X position (x + width)

same with y,

and v, what the object is "Grass" , "Barrier"

I have a function that tries to return if 2 boxes are colliding, but it doesnt seem to work properly, please help?
(Function name playerColliding I think)
Attachments
objectcollision.lua
(1.5 KiB) Downloaded 24 times

User avatar
pgimeno
Party member
Posts: 1903
Joined: Sun Oct 18, 2015 2:58 pm
Location: Valencia, ES

Re: Making a library, not quite there yet [HitBoxes]

Post by pgimeno » Thu Dec 06, 2018 7:04 pm

Something very similar to this was recently discussed:

viewtopic.php?p=224233#p224233

Post Reply

Who is online

Users browsing this forum: Google [Bot] and 6 guests