Advertisement

This should be easy to someone!!! =)

Started by May 18, 2002 05:36 PM
18 comments, last by White Rabbit 22 years, 9 months ago
I''m starting to get sick of this BS...
a person: First, I know an engine is suposed to be complex mathy and whatever other things you might wanna call it, i also know that i have tryied the simple stuff and it''s when your try this hard stuff that you get doubts, you start needing advice and not some moron putting us down, second, i wouldn''t want anyone even remotly like you following me, and THIS IS NOT a "square box vs cylinder box" post, it''s a "cylinder box how" post, moron, third, I DID research this, enough to know that it''s used in MDK2 engine, UT engine and Quake3 engine, thus your notion of what''s "best" for a realtime game is useless to me, moron, almost ending, It''s a bounding box... you have a point that''s the place where the player is, a radius and a height, OF COURSE is a perfect cylinder!!! moron! And last you where right in one thing equaling funtions was a mistake, i described has "equaling" funtions the mathematical method used to get the funtion of the interception of the to funtions, the one of the plane and the one of the circle, STILL, someone, NOT you or course, was smart enought to understand without having to put me down because of it, moron.
To conclude, i thank all the help that has been given, but all of you who DON''T know how to answer a question, and just go to google find some unconclusive papers on the subject and tell ppl how easy it was, and we should do the same, just to feal warn and fuzzy inside because they helped some hopeless n00b, can STOP answering my posts!!! I DON''T need some script kid asshole with no notion of what a cylinder bounding box is, to come here and put me down because i didn''t use google, when they don''t even know what i''m talking about!

"Follow the white rabbit."
"Follow the white rabbit."
123cs: first of all yeah i don''t want it to be infinite, is suposed to be a (pill)box.
second with your algorithm you can still have a big polygon with all the vertices outside the cylinder, and away enough for even the closest point on the polygon to be more distant than the radius of the cylinder.

"Follow the white rabbit."
"Follow the white rabbit."
Advertisement
What i think is the right algorithm for acheiving this is something like...

-you clip the polygon to y and y+cylinder_height, let y be the cylinder base y;
-then calculate the closest point to the center of the cylinder in the plane(not perimeter);
-finally, if the distnce between this point and the center of the cylinder is smaller than the cylinder radius, there is a collision

I just can translate this to code, of any conclusive funtion.

"Follow the white rabbit."
"Follow the white rabbit."
quote:
Original post by White Rabbit
...with your algorithm you can still have a big polygon with all the vertices outside the cylinder, and away enough for even the closest point on the polygon to be more distant than the radius of the cylinder.

"Follow the white rabbit."

this is not a problem, because of the first check (the ray-poly one)
"Art is a lie that lets us recognize the truth." - Pablo Picasso
hehe...now we ended up with the same solution
"Art is a lie that lets us recognize the truth." - Pablo Picasso
Thw white rabit is useless. Hey, Buddy, The fourms arn''t here for people to serve you. The fourms are here for people to get problems they can''t solve themselves figured, not for some useless person to come along and demand help because they can''t do a simple search on google.
Advertisement
Anonymous: You should probably either read everything, or learn how to read all together, before showing your ignorance, my "basic" message on that rant up there was simply "if you can''t help, STFU, instead of putting ppl down". So don''t you come up to me with the old "i demand some info" cause i demanded nothing!

PS - Moron!

"Follow the white rabbit."
"Follow the white rabbit."
Your cylinder information is unclear. Is this height specification upward from the point, downward from the point, or is the point in the middle of the cylinder?
If your cyclinder is always upright (which I assume it is, since it is for Quake, UT and MDK2), then the solution presented in the paper I gave if perfect for you. It''s basically the solution given by 123cs (taking the ends into account) and it is very fast... there''s about 3 different "quick-out" tests that it does (i.e. the triangle is too far away, etc)

And I don''t know why you''re getting so righteous about people helping you. I know that flaming newbies has gotten a lot of press on these forums lately, but I don''t consider myself to be one of those people responsible. I always try to be as helpful as I can, and if you don''t think pointing you to a paper which describes your problem exactly is helpful, then I''m afraid you''re not going to find much on these forums of interest to you at all. As I said before, the algorithm for the intersection of a cylinder and a triangle is a relatively trivial thing, and there''s not much scope for discussion. If you didn''t know that before you posted, then fine - but I''m telling you now, as someone who is perhaps a bit more experienced, that it is, and that finding a paper on the subject is going to yield better results than some half-assed attempt at an answer by one the members here. Now, 123cs''s answer was good, but it was a little vague. The answer in the paper I pointed you to is consie, to-the-point, and even includes information on optimizations of the technique. I don''t know about you, but I prefer the answer in the paper.

(P.S. 123cs, I''m not saying your answer is bad, I''m just saying that it''s about the level of answer you''d expect on a forum; fairly simple, kind of vague. Not because you don''t know the answer, but simply because you''re not going to spend an hour going into the detail of a paper like that.)


codeka.com - Just click it.
Folks,

White Rabbit, you are perfectly justified in wanting to use these forums instead of google in order to obtain a custom answer to your question. That is what the forums are here for, .

But understand that if you ask a very basic question (as you did), you should expect some people to simply refer you to prior work on the subject. That's exactly what I would have given, since I don't have time to really produce detailed custom answers to most threads. We're volunteers here, not teachers. And we have only very limited time available to donate to these forums.

Everyone, please remember to be courteous in the forums. There's nothing beneficial to be gained with flames.

Graham Rhodes
Senior Scientist
Applied Research Associates, Inc.

[edited by - grhodes_at_work on May 20, 2002 3:33:35 PM]
Graham Rhodes Moderator, Math & Physics forum @ gamedev.net

This topic is closed to new replies.

Advertisement