Hello! I have been thinking about this question for days and decided to come to the devforum for help.
I wanted to know how to make an attitude indicator. Here is an example.
I wanted to make that line in the middle move in relation to the player’s rotation. How would I go about doing this? This basically means that the line will go up or down, left or right based on how the player is moving. I have made the speed and altitude indicator however I cannot figure out how to do this and there are no articles on the devforum. Thanks!
To go into more detail, an attitude indicator is a gyroscopic instrument [or electronic] that is used in most/all planes.
What you could do is map its x rotation to the domain of the players inverse cosine to world space (basically the angle between the players look vector and some arbitrary look vector relative to world). To map it to that i’d recommend my Math++ module Well to be honest the domain is already -pi to pi so u could just abstract from the linear interpolation formula. For the turning i’d get its z rotation and do the same thing but instead of mapping the alpha of our range to the position i’d instead map alpha to a domain of -45 to 45. Tell me if you got any further questions