Hard Light Productions Forums

Modding, Mission Design, and Coding => FS2 Open Coding - The Source Code Project (SCP) => Topic started by: General Battuta on October 27, 2015, 06:42:10 pm

Title: Please have mercy upon the damned
Post by: General Battuta on October 27, 2015, 06:42:10 pm
What is the formula for translating player pitch/bank/heading (PBH) into background editor PBH?
Title: Re: Please have mercy upon the damned
Post by: z64555 on October 27, 2015, 09:24:26 pm
Pitch is positive. 0 through 360 degrees rotates upward
Bank is positive (rotates graphic clockwise about its center)
Heading is... negative? Positive values rotate it towards the left.

Degrees to Radians = (degrees) * (pi / 180)
Radians to Degrees = (radians) * (180 / pi)
Title: Re: Please have mercy upon the damned
Post by: General Battuta on October 27, 2015, 10:01:26 pm
Okay, cool.

If I have a set of player PBH values measured in-game (where the player's nose is pointing), how can I translate those into background PBH values?
Title: Re: Please have mercy upon the damned
Post by: z64555 on October 27, 2015, 10:08:07 pm
Okay, cool.

If I have a set of player PBH values measured in-game (where the player's nose is pointing), how can I translate those into background PBH values?

If the player's angles are in degrees, P would be equal, H would be equal and negative, and B would be equal. I haven't found a direct correlation between the angles yet, so I'm pretty much shooting blind here.