Crude but easy Craft collision detection

If you haven’t any experience with Craft’s rigidbodies, and you don’t need precise collision detection (or all your objects are rectangular) here are some simple easy-to-use functions that can do the job.

Craft Rect Bounds.zip (92.6 KB)

1 Like

Nice, personally i was going to use psuedo 3D where i just add 1px dimension to a fake z index on the 2D physics engine, then i trade out “categories” based on diff of z change that is absolute maxed, it creates fake 2.5D piles, but i haven’t really tested it out yet

i will also look into this and how it works

@skar, I don’t really get what you mean, but it sounds cool… have you heard of SAM? It’s a known way to perform collision detection if you can get silhouettes of the objects from different angles. I can do the silhouettes (see touch detection post) but not the angles.

surface to air missile?

not sure what SAM is regarding physics, have a link?

i guess what i’m describing is confusing if i don’t stipulate that it’s in a isometric 2.5D view, so physics is still 2D but offsetting the images that represent those boxes in a “z” direction to prevent them from stacking like 2D boxes, instead some will stack and others will fall to the 4 sides instead of just 2

I got it wrong, it’s SAT — Separating Axis Theorem.