Stack Exchange network consists of 183 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.
Do you mean "Narrow phase collision detection"? The question you've asked above deals with Narrow phase; how two objects collide, and where they've hit each other. Broad phase is the section that partitions the world to minimize collision checks. There are a lot of different ways to implement broad phase that require some design history of your project to build one that would work best for you. The first link in a google search for "broad phase collision detection" comes up with a rather good article, which has a JS implementation: buildnewgames.com/broad-phase-collision-detection
If you take a look at the locations of the spheres (pos, center, radius) and the aabbs (pos, min, max) that are colliding incorrectly it would probably help you understand where the issues are coming from. It sounds to me like if your not taking the "pos" into account then you may have them all stacked at the worldspace origin (0,0,0).
I don't have a java compiler handy, and I don't know what implementation of Vector3f you're using but I would guess it would look something like: Vector3f worldspace_max = Vector3f.add(pos, max, null); Vector3f worldspace_min = Vector3f.sub(pos, min, null);
@MackybenJonah If you could point me to some documentation on the java Vector3f your using I may be able to help you find a function that works. 'Magnitude' may be called 'Length'. And if there is some sort of 'Scale' function you can scale the vector by 0.5 which is equal to divide by 2. As far as a java OGL library I'm sorry but I don't have any recommendations.
@Slagmoth sorry for the delayed reply. It's really up to you how you set up your architecture but I'm generally in favor of Dependency Injection where possible even if Unity makes it difficult sometimes. It looks like the GameManager in this question is a Single Instance, so that's something to consider as well.