Archived

This topic is now archived and is closed to further replies.

Krippy2k

Swept bounding ellipsoid cd question

Recommended Posts

Krippy2k    134
Greetings all, I implemented the 'bounding ellipsoid' method described in a paper here: http://www.peroxide.dk/tuts_c.shtml It works great, except for one thing. The fattest part of a humanoid model is not at the center of the model in most cases, unless the humanoid has it's arms at it's side in a resting position. In a first-person shooter type game, the models often have their hands extended out in front holding a weapon. Currently I am calculating the radii of the ellipsoid based on the models bounding box dimanesions. Say if the bounding box was 3x6x3, the ellipsoid would be 1.5x3x1.5. Now if the model is extending it's arms, the arms protrude from the ellipsoid because the arms are higher than the center of the model's mass, and in most cases they stick through the wall and can be seen from the other side if the actor is up against the wall, facing the wall. If I increase the width and length of the ellipsoid, that problem goes away, but then the actor cannot fit through doorways or other spaces that it should be able to easily fit through. Here is a screenshot of what I am talking about, there is a model on the other side of the wall that is using a very simple chase algorithm to come directly towards me, and you can see where it's arm is sticking through the wall. http://www.whogotgame.net/ss1.jpg (Yes, my level modelling skills are pretty bad, thats not the point ) Ideally, I think that if I could skew the ellipsoid in the ellipsoid space so that the widest part of the ellipsoid is off-center, maybe 1/2 way between the center and the highest point, more like an egg shape, the collision detection would be much more accurate in most scenarios that I will encounter. However, I seem to be at a loss as to how I could accomplish this, or if it is even possible using the method I am using. Any suggestions on how to accomplish this, or suggestions of other methods (with comparable speed) that would be more accurate for my needs, would be greatly appreciated. I can *probably* do it by using multiple ellipsoids per model (say one for the legs, one for the torso, and one for the head. But that would triple the time it took to detect a collision, which isnt the fastest process in the world. I would like to avoid that if at all possible. It also obviously goes away if I cull the model via the portal-rendering, I modified the code so that it doesnt cull any of the moving objects to show what is happening, but even with the culling there are times when the model will be in view and still sticking through the wall. Thanks Krippy [edited by - krippy2k on January 4, 2004 8:00:28 PM]

Share this post


Link to post
Share on other sites