I have an airplane flying at side view, but the player can go a few screens high (The game isnt limited to the size of the screen) Would be nice to be able to give him an idea of how high he is, to avoid sudden high speed contact with the sea or land.
So im guessing i need to just capture my position relative to the last one, to work out if hes going up or down, but what about certain speed etc, the player can control the throttle, so im not entirely sure on how to approach this.
Any idas would be welcomely celebrated!!!
An altimeter is just a display of the .y value of your position.
In real life this is accomplished by measuring air density, which decreases as you go up (until you reach space). It knows nothing about mountains or valleys.
A radar altimeter bounces radar off the ground below the aircraft and measures how far away the ground is. This means if you’re in the mountains it will tell you distance to ground.
Those are two different instruments.
A vertical speed indicator (VSI) read out altitude (from either of the above source) and displays how much that value changes over time. In other words it compares current altitude to the previous frame.
So:
-
altimeter: just print transform.position.y, scaled and formatted how you like
-
radar altimeter: use raycast down to see how far from the ground you are
-
VSI: pick one of the above and display how much it is changing each frame.
Woah dude are you a pilot? LOL thanks for that! will try implement something a bit later after washing the car.
Is there anythin KD cant do?
…got any flying videos?
1 Like
Works great thanks man!!!
1 Like