New answers tagged

1

You mentioned using GJK, but that you stepped away from it because they were using things that are more complicated than boxes. Might I suggest that you stepped away too soon? Because GJK uses support maps, you can use GJK for any convex shape, including OBBs, for which a support mapping is defined. So, if you know how to define the support function for an ...


1

I converted to using a quarternion to hold the value of the rotation which I could readily create from the normals, so the "fix" was for me to understand how rotations work better. For the libraries I was using, the fix was simply: val q = Quaternionf().setFromNormalized(axes) gameItem.setRotation(q) Here's an image from inside the torus better ...


1

3 direction unit vectors contain all the needed information for rotation. So there are 2 solutions: Having calculated the centres and the 3 direction unit vectors you can build a matrix that would transform local space mesh to world space. GameItem would have single Matrix4f field instead of position, scale and rotation fields. You then just pass actual ...


Top 50 recent answers are included