I've attempted to add some sort of collision 'box', but I cannot make it follow the Ship's rotation. Having said that, now to your problem: You need a proper collision-response algorithm. Furthermore, each object can be classified into more abstract groups or categories. Each object has material properties, a bounding box for collision and an amount of transparency for instance. Instead of creating an instance of the hypothetical Display class, static methods are invoked. Instead of looking at the scene as a bunch of shapes, look at the scene as a bunch of objects. Unlike in other Java windowing libraries, the LWJGL handles the window statically.
In that case I would suggest having a look at JBox2D. By the end of this tutorial you will have learned how to create, update, and destroy a display compatible with the Lightweight Java Game Library.
The Ship-To-Ship collision has been impossible for me to implement. Also maybe while your graphics is 3D your gameplay probably is 2D and does not require a full 3D engine, but you could get away with a 2D engine. With the ships, I detect if a CannonBall is in one of the coordinates that the ship is in with a delayed task. I've been working on implementing SAT collision in my 3d game engine using LWJGL following this tutorial for 2d SAT collision.Since the tutorial is for 2d and I'm trying to do 3d collision, I nee.
If you don't do something like that, your objects will hit bumps when sliding on the floor. The problem is that collision detection is horrible. Quote: bool AABBIntersect(const Vector& mina, // min vector of boxa const Vector& maxa, // max vector of boxa const Vector& minb, // min vector of boxb const Vector& maxb, // max vector of boxb Vector& ncoll, // normal of collision. The collision code thinks the ball is a rectangular box, so the ball often collides with a brick even though the ball sprite itself isn't yet touching the brick. If your boxes intersect, the direction of the hit will be where the intersection along the X, Y, or Z axis are minimum. Because the ball is a circle-like object, an AABB is probably not the best choice for the ball's collision shape.
For 3D boxes, you have 6 faces, so 6 potentential hit direction.