[01:01:07] --- LordN_Away is now known as Lord_Nightmare
[01:24:29] <Coren_> Meh. I have a problem in my collision detection code that defeated my meager linear algebra skills. I don't suppose anyone here is a crack at spacial geometry? :-)
[01:37:16] * smatthews_ teases Coren_
[01:37:24] --- smatthews_ is now known as servus
[01:37:38] * Sevalecan laughs at Coren_
[02:49:11] <Lord_Nightmare> Coren_: what do you need help with?
[03:07:36] <Coren_> Given a polygon on a plane and a point on the same plane, is there a quick and dirty way of knowing which point that lies on the polygon is closest to that point? Best I can come up with is closest to a line, which works for the edges of the polygon, but breaks if it's a corner that's the closest.
[03:07:54] <Coren_> I already know the point isn't /in/ the polygon.
[03:08:05] <Coren_> I can trivially reduce to triangles if that helps.
[03:09:00] * Coren_ just realized he's been about a clear as a tarpit. At night.
[03:10:05] <Coren_> Well, at any rate, my problem is moving sphere/polygon collision. I've solved all cases except sphere crosses the plane outside the polygon buy would interfere before it got all the way through.
[03:18:18] <Coren_> As is usually the case, I'm probably overcomplicating the problem anyways. Chances are there is a simple solution to the entire problem and I just can't see it. Hence the need for that special case.
[03:32:41] <Lord_Nightmare> hmmm
[03:33:43] <Lord_Nightmare> i think you need to do the line thing for all edges of the polygon which are 'visible' from the point, i.e. can have a straight line drawn between that side of the polygon and the point without intersecting the polygon.
[03:33:52] <Lord_Nightmare> theres probably a better way than that, though
[03:34:25] <Coren_> I've been considering converting sphere-over-time to a cylinder, but that makes figuring out the moment of collision hard.
[03:34:35] <Coren_> Hmm.
[03:35:45] <Coren_> Actually, your 'visible' bit is worth investigating. Due to my code structure, I already do a very great deal of culling, so even if it's a bit expensive it does'nt worry me.
[03:36:13] <Coren_> In other words, by the time I'd want to do that test, I already know there will be a colision. Just not when.
[03:36:29] <Coren_> (And I already have weeded out the simple cases)
[03:43:46] <Coren_> Hah!
[03:43:57] <Coren_> Thanks. You made me think in the right direction.
[03:44:52] <Lord_Nightmare> cool
[03:45:14] <Coren_> Found an easier way: check for collision with the planes (perpendicular to the polygon plane going through the edge) that face the sphere.
[03:47:27] <Coren_> Plane-sphere is so trivial it's funny. :-)
[10:44:44] --- Lord_Nightmare is now known as LordN_Away
[17:43:38] <Fl00der> hi
[19:52:22] --- LordN_Away is now known as Lord_Nightmare
[20:12:07] --- _Coren is now known as Coren_
[22:05:18] --- Baastuul_ is now known as Baastuul