LongJumper
2003.05.04, 11:45 PM
You know, I don't know jack about collision detection. I've avoided it to the point where I acutally work on my computer science projects now(I have a B in CompsCi 367 now, thank you.)
Anyway, I've read a little on the situation, and I've come to some conclusions:
1. It sucks.
2. It's hard to do and it sucks.
3. It sucks.
The general idea I have behind it is that you must loop through all objects in an area each time you do collision detection. I might be wrong, I'm still going to talk though.
My idea to preventing this solution that may not exit is to create an object hash table, keyed on the coordinates of an object(x and z would be weighted more, since you usually don't fly as much as you walk, you know)
With this situation, you'd only check objects that are around you, and you wouldn't have to search which objects were you near you because you could just look up the search keys for coordinates close to you.
Now of course, there are alot of problems with this. Such as how far do you check? What if an object is in your range, but it's center is out of it? Anyway, it's just a thought. It'd be good to get some thoughts on this.
Anyway, I've read a little on the situation, and I've come to some conclusions:
1. It sucks.
2. It's hard to do and it sucks.
3. It sucks.
The general idea I have behind it is that you must loop through all objects in an area each time you do collision detection. I might be wrong, I'm still going to talk though.
My idea to preventing this solution that may not exit is to create an object hash table, keyed on the coordinates of an object(x and z would be weighted more, since you usually don't fly as much as you walk, you know)
With this situation, you'd only check objects that are around you, and you wouldn't have to search which objects were you near you because you could just look up the search keys for coordinates close to you.
Now of course, there are alot of problems with this. Such as how far do you check? What if an object is in your range, but it's center is out of it? Anyway, it's just a thought. It'd be good to get some thoughts on this.