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: 27
Joined: Mon Dec 03, 2018 11:21 am

Making a library, not quite there yet [HitBoxes]

Post by LuaCre »

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 88 times
User avatar
pgimeno
Party member
Posts: 3548
Joined: Sun Oct 18, 2015 2:58 pm

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

Post by pgimeno »

Something very similar to this was recently discussed:

viewtopic.php?p=224233#p224233
Post Reply

Who is online

Users browsing this forum: No registered users and 37 guests