Ok I finally figured out how to use SAT 3d
But how can i resolve the collision.
I first wantet to just reset the last step at a collision, but that seams unnatural.
Does anyone have a better Idea?
Resolve Collision
SAT is a good start, but eventually you'll have to figure out the features of the objects that are intersecting, like which edges and which faces. You need references to these features so you can feed that information to the Verlet system which will "deform" these features, and the collision response will follow from that, because the objects will subsequently "fix" themselves through their rigid structures. I'm posting the X-purge demo from 6 years ago. Hit the 'T' key. You'll see the rigid structures. Hit 'T' again, you'll see object features. Try laying the 'X' on its side (ijkl rotates obj) on top of the cube. You'll see periodic impulses to certain edges. That's when the deformation or response is applied. It blinks on and off with the impulses. Hope this helps you.
[attachment=10029:X-Purge-Demo-Bin.zip]
[attachment=10029:X-Purge-Demo-Bin.zip]
--bart
Assuming your colliding object has some sort of velocity-vector/tangent, you can interpret the separating axis as a plane of impact's normal.
e.g. an elastic response: vec = vec - 2 * axis * dot(axis, vec)
e.g. an elastic response: vec = vec - 2 * axis * dot(axis, vec)
Assuming your colliding object has some sort of velocity-vector/tangent, you can interpret the separating axis as a plane of impact's normal.
e.g. an elastic response: vec = vec - 2 * axis * dot(axis, vec)
I guess when objects are colliding there is no separating axis.
And also if we take a very simple example of two spheres colliding and the axis is normal to the tangent plane at the point they touch, your calculations are not physically correct.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement
Recommended Tutorials
Advertisement