/BasicRectangleColliderJs

A basic rectangle collision library made for just non-rotated rectangles that tells you the face collided with and has a collision system where you can have one element be static and one dynamic. It's mostly just for use in my projects, but feel free to use it in your own.

Primary LanguageJavaScriptMIT LicenseMIT

BasicRectangleColliderJs

A basic rectangle collision library made for just non-rotated rectangles that tells you the face collided with and has a collision system where you can have one element be static and one dynamic. It's mostly just for use in my projects, but feel free to use it in your own.

You can find examples here. Currently this example uses p5.js.

This library supports drawing the collision box for debug purposes.

(btw the only reason I use this in my projects is for the control and because I don't need anything more complex, but for a lot of projects I wouldn't recommend using this library. I'd only recommend this library if u want the same stuff that I did in my projects, which was a small quick and easy system with tons of control.)

To use it you can simply include https://cdn.jsdelivr.net/gh/RandomGamingDev/BasicRectangleColliderJs/collider.js in your HTML file! If you want to you can also just download the file and include it in your HTML file that way.

btw stuff updates so remember to specify a version/commit for your library if you want to use a link and don't want your code to automatically update to the newest version of the library