Not necessarily. There are scenarios where static objects must be spawned on top of others. For example, explosions. They are created suddently and they affect a more or less great area - potentially overlapping with existing objects. But yes, it could happen that a coder moves an object around (with world:move) without checking for collisions first (with world:check), or resolving the collisions poorly.Ranguna259 wrote: This, this is what causes most of the bugs, in my collision code I used this for everything. Bad times..
But since your just using this for static objects I think it's fine, but how can two static objects collide, Probably only if the coder coded two static objects on top of each other by mistake, right ?
The idea is not mine. I took it from Collision Detection for Dummies. I just decided that I didn't want to use lots of vectors, so I stuck with AABBs instead of polygons.Ranguna259 wrote: Interesting approach, I actually use this algorithm in my geometry lib to check intersection points between a line and rectangles. I never thought about using it to resolve collisions.
I don't like having to use edge shapes. They look like a cop-out . But whatever works for everyone. Your gif looks coolRanguna259 wrote:I use [wiki]love.physics.newEdgeShape[/wiki] and then I attach all EdgeShapes to a single static body, thank you Omar for telling me how this is done