Page 1 of 1

Question: Get real pitch angle after rotate yaw

Posted: Mon Jan 01, 2024 3:37 pm
by minimy
Hello and happy new year guys!!
I have a problem when use rotation.
Example: When rotate pitch, if rotate yaw, all rotation angles change. Test with absolute and relative and result is some.
Any way to get the real angle of pitch?
Thanks for help.

Re: Question: Get real pitch angle after rotate yaw

Posted: Mon Jan 01, 2024 3:39 pm
by SPH
Without code, it's hard to anserw you

Re: Question: Get real pitch angle after rotate yaw

Posted: Mon Jan 01, 2024 4:08 pm
by STARGĂ…TE
EntityPitch has two modes: #PB_Engine3D_Raw and #PB_Engine3D_Adjusted

Re: Question: Get real pitch angle after rotate yaw

Posted: Mon Jan 01, 2024 6:55 pm
by minimy
This is my simple solution, I know it's not the best, but for now it works for me

Code: Select all

      
      pitch.f= EntityPitch(entity,#PB_Engine3D_Adjusted)
      If pitch>=90 Or pitch<=-90: pitch-180:EndIf
      If pitch<=-300: pitch+360:EndIf