Hello, I have a game that transforms the player pitch like this.
pitch = 1.0
Equation used in matrix calculation is: 1.0 - sin(pitch))
But the normal way is: cos(pitch).
So for example the pitch is more sensitive when closer to 0.0:
atan2(sin(pitch), 1.0 - sin(pitch)) = 1.38458
So the value scales now, which is used for game controllers; and I cannot changed it, as it's locked to older versions of the game, which play online.
Another way of looking at it: How to extract pitch from x when x is 1.0 - sin(Pitch) ?
Now Is it possible to get 1.0 back from 1.38458? Because I'd like newer versions to abandon the scaling, but still support old versions online in servers.
Something like this:
If ( Player.IsOldVersion ) {
Player.Pitch = UnscalePitch( Player.Pitch );
}
And on sending packets:
PlayerPacket.Pitch = ScalePitch( Player.Pitch )
Edit: Rewrote.