Yeah this will be in global space and I've converted the sin cos and into radians first. Does it need to be the other way around?
You actually didn't do it first, but last. It might be written earlier in the code, but it happens last.
Before I confuse you, this is what you wanted to do:
1 2 3
| double yRotDegrees = ...; double yRotRadians = Math.toRadians(yRotDegrees); double yRotSin = Math.sin(yRotRadians); |
when we move the statements on 1 line, you'll see that when we replace the variables with the calculations, we end up with:
1 2 3 4
| double yRotDegrees = ...; - double yRotRadians = Math.toRadians(yRotDegrees); - double yRotSin = Math.sin(yRotRadians); + double yRotSin = Math.sin(Math.toRadians(yRotDegrees)); |
while you did:
1 2
| double yRotDegrees = ...; double yRotSin = Math.toRadians(Math.sin(yRotDegrees)); |
This is fundamental to programming / math / logic, so I advice you to look back at your original code and try to
really understand why it doesn't work - otherwise you'll find yourself in a heap of trouble, basically incapable of getting much done
