Quantcast
Channel: GameDev.net
Viewing all articles
Browse latest Browse all 17825

Extracting face/hit data after a GJK step

$
0
0
My collision routine returns the distance if valid. However, I seem to be missing a few basic steps, which might well be leading me down the wrong path. 1) once I have my simplex, is it safe to assume that: a) in the case of one vertex (0-simplex), the collision is between a vertex and a vertex|edge|face OR an edge and an edge? b) for a 1-simplex the collision is between an edge and any other feature, but NOT a vertex? c) for a 2-simplex I can always use the three known indexes to match the colliding face on either shape? d) for a 3-simplex the shapes are either touching or penetrating and require separation? 2) my main problem is coming up with a way to sample either object for a face, edge or vertex in case I arrive at a 0-, 1- or 3-simplex. In particular - I'm having trouble with balancing a smaller box on the edge of a larger one so that exactly half of it is hanging over the edge. I'm getting all kinds of screwy normals here, causing the smaller box to fall through the larger one when I try to balance and slide it around under gravity. Is the solution here to separate motion along all three axes? For now all I want is a normal, but for that I need a direction in shape local space. How do I extract this from the simplex? PS - I'm taking the dumb route and writing this stuff from scratch. Don't ask...

Viewing all articles
Browse latest Browse all 17825

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>