0

I'm working on some local space functions for a little project.

I've got a function called getRotation(), which should return the euler angles for an object given it's parent's rotation and it's own local rotation.

So given two rotation vectors:

Vector3f parentRotation
Vector3f localRotation

How can I apply the local rotation onto the parent rotation?

If it helps I'm using Java with LWJGL 2.

Alex231
  • 19
  • 2
  • 1
    see this [Is there a way to calculate 3D rotation on X and Y axis from a 4x4 matrix](https://stackoverflow.com/a/56950130/2521214) so you simply compute transform matrix (by applying your euler angles rotations in their order and after that just convert resulting matrix back to euler angles, or throw the Euler angles crap away for good) – Spektre May 24 '20 at 07:57

1 Answers1

0

The solution here was to move to a a transformation matrix as suggested by Spektre. While this may be possible with Vector3f angles, those just aren't suitable for game development, at least not with this stack, as they introduce many problems.

Alex231
  • 19
  • 2