Search found 1 match

by thedarkcoder
Wed Jan 24, 2018 3:46 pm
Forum: General
Topic: Collision detection without physics?
Replies: 14
Views: 26064

Re: Collision detection without physics?

Few years old, but here's a handy little function to detect collision between two images ;) Where "a" and "b" are the variable name of two images. function collision(a, b) aw, ah = a.img:getDimensions() bw, bh = b.img:getDimensions() return a.x < (b.x + bw) and b.x < (a.x + aw) a...