Logical collision problems

Started by
0 comments, last by Zealot 21 years, 9 months ago
Ok, here is the situation: I am using a program I wrote to map boxes around MS3D files, then using the ColDet library to create a poly-soup collision model. I went about doing this, so that I could split each box up into six parts. This effectively created six collision models for each object. Now I have a problem. I need to check for collision, but it can''t be done simply! My problem is, logical. For example, if you press the left arrow key, a little box within another box will move to the left. Before moving, I check to see if the left side or right side collision model of the box touches any of the left or right side of any other collision boxes. This presents a big problem. Whenever I collide, the program does it''s duty, and prevents it from going further, but since I have to check both right and left sides* of it, when I press right, it won''t move, since the right or left is touching another right or left. I was just wondering if anybody has an idea on how I could fix this. *This is because of a glitch in the program I wrote, you can specify the box backwards, which results in the rights and lefts being reversed. Also, if the box is rotate 180 degrees, then the other side should be checked. En taro Adun! Doom to all who threaten the homeworld! *Protoss Zealot - Starcraft*
----------------------------------------------------------You know, I might as well go ahead and say I can't fix the problem... because that's when I figure out how.
Advertisement
It sounds like you are testing for both collisions in the same collision test... or maybe I''m just confused about your problem! It would seem to me that you can naturally infer that if the person hits the left arrow, there isn''t going to be a collision at the right hand end of the box... and vice versa... so only check for the collision in the direction they pushed the key.

If I''ve misunderstood the problem, please ignore this post.

Cheers,

Timkin

This topic is closed to new replies.

Advertisement