|
In this OGRE demo, the player is able to shoot out small bullets (considered points) to hit the character. The collision detection check is hierachical, meaning that the check is done on the larger, less accurate bounding volumes before checking their smaller, more accurate children recursively. This reduces the time complexity from O(n) to O(lg n), assuming a more or less constant branching factor, which makes the collision detection a lot faster. OBBs are constructed for each joint of the character and a point+OBB test was to be done to detect collision. However, I transformed the colliding point into the space of the OBB so that this converts the OBB to an Axis-Aligned Bounding Box (AABB). This means the algorithm will run faster since less checks are needed to detect collisions between the colliding point and the AABBs. In the video of the demo below, bullets are shot towards the character. Notice that the bounding boxes which the bullets have collided into have turned red, indicating that the collision detection algorithm is working.
Note: Scene setup done by Goh Cheng Teng. Model and animation provided by Dr Golam Ashraf. |
Copyright © 2003-2024 Skeel Lee. All works are original ones by Skeel, unless otherwise stated.
|