# Looking for help with daabbc library

**URL:** <https://forum.defold.com/t/looking-for-help-with-daabbc-library/79069>\
**Category:** Questions\
**Created:** [December 6, 2024, 3:32am UTC](https://forum.defold.com/t/looking-for-help-with-daabbc-library/79069 "2024-12-06T03:32:39Z")\
**Posts on this page:** 1\
**Showing post:** 3

<div class="post-metadata">

**Author:** ![selimanac](https://forum-defold.b-cdn.net/user_avatar/forum.defold.com/selimanac/32/6397_2.png) [@selimanac](https://forum.defold.com/u/selimanac)\
**Post date:** [December 6, 2024, 8:55am UTC](https://forum.defold.com/t/looking-for-help-with-daabbc-library/79069/3 "2024-12-06T08:55:01Z")

</div>

> [@goeshard](#):
>
> It looks like I need to figure out a technique to correct the distance traveled into the collision.

Generally, you don’t need to. You can simply stop moving your object in the current direction when a collision occurs. This approach is simple and sufficient for most cases.  
You can get direction from movement or using raycasts

> **[Raycast](https://github.com/selimanac/defold-daabbcc/wiki/Raycast)**
>
> Dynamic Tree(aka AABB Tree) native extension for Defold Engine - selimanac/defold-daabbcc

Another approach might be using Tile Raycast and combining it with DAABBCC:  
[https://github.com/selimanac/defold-tile-raycast](https://github.com/selimanac/defold-tile-raycast)  
There is a example of it:  
[https://github.com/selimanac/defold-tile-raycast-platformer](https://github.com/selimanac/defold-tile-raycast-platformer)

> [@goeshard](#):
>
> If I’m not mistaken, these are the distances is that correct? There is four of them because my player box is overly wide and occupies four tiles.

No, they are not. They are overlapping AABB IDs. In your case you are hitting 4 tiles.

> **[Queries](https://github.com/selimanac/defold-daabbcc/wiki/Queries)**
>
> Dynamic Tree(aka AABB Tree) native extension for Defold Engine - selimanac/defold-daabbcc

More info about what is this lib and not:

> [@DAABBCC - Dynamic Tree(aka AABB Tree) native extension for fast AABB collision detection](https://forum.defold.com/t/daabbcc-dynamic-tree-aka-aabb-tree-native-extension-for-fast-aabb-collision-detection/18328/63):
>
> We can simply say that this is a small part (only the broad phase) of Box2D. Most physics engines I know have two phases: broad phase and narrow phase. The broad phase quickly checks for potential overlaps, usually using structural data (like trees), and it’s fast. If the broad phase detects overlaps, then the narrow phase takes over, using the broad phase results to generate detailed manifolds. This phase is more computationally expensive (and slower). Physics engines also perform many calcu…

> [@goeshard](#):
>
> In the default Defold approach, there is a “normal” that it used.

There is no collision resolution (e.g., normals) in this library. It is an expensive process, and I am considering implementing it as an optional feature.

> [@DAABBCC - Dynamic Tree(aka AABB Tree) native extension for fast AABB collision detection](https://forum.defold.com/t/daabbcc-dynamic-tree-aka-aabb-tree-native-extension-for-fast-aabb-collision-detection/18328/74):
>
> About collision resolution using DAABBCC It is possible to add basic collision resolution(aka manifold generation) to this library for resolving contact points, depth, side, normal, etc. The first version of this library actually [included this feature](https://github.com/selimanac/defold-daabbcc/tree/v1.0?tab=readme-ov-file#--checkmanifold). However, it was poorly designed, and since no one was using it, I decided to remove it. If your project has a serious need for collision resolution, I can reintroduce it with a better design. Please let me know about your requirements and your …

---

_[View the full topic](https://forum.defold.com/t/looking-for-help-with-daabbc-library/79069)._
