Space Engineers

Space Engineers

1,000 ratings
Whip's Artificial Horizon Redux
2
4
3
2
2
17
   
Award
Favorite
Favorited
Unfavorite
File Size
Posted
Updated
497.518 KB
Apr 23, 2019 @ 5:48am
Oct 14, 2024 @ 11:30am
18 Change Notes ( view )

Subscribe to download
Whip's Artificial Horizon Redux

In 1 collection by Whiplash141
Whip's Scripts
22 items
Description
Whip's Artificial Horizon Redux


Updated the space orientation indicator to draw 3D arrow heads for better visual clarity



Howdy!

This is my rendition of an artificial horizon for use on the ship cockpit screens and regular LCDs and text panels; I wasn't satisfied with Keen's so I made my own. This script utilizes the new sprite based drawing API to allow the visuals to be much more crisp than my old pixel-based variant.

In atmosphere, the script will display a colored artificial horizon with graphical indicators for velocity, pitch, and roll as well as text displays of altitude, speed, and heading.


When you leave a planet's atmosphere, the horizon disappears and the screen functions as a graphical velocity indicator where speed and acceleration are displayed on screen. Also, the world XYZ axes are drawn to help you orient yourself in space.



  • Works with new cockpit LCDs
  • Prograde and retrograde velocity indicators that never go off screen
  • Fully configurable colors
  • Uses Custom Data for customization (No more need to modify the code!)
  • Uses new sprite drawing API to generate crisp visuals
  • PULL UP warning displays when the script detects that a collision with the ground is imminent
  • Works as a graphical velocity indicator in space
  • World XYZ axes are shown when in space to help you orient yourself


Required Steps
  1. Place this script on your ship
  2. Place one or more ship controllers on your ship (Cockpits, Flight Seats, or Remote Controls)
  3. Add Horizon to the name of text panels or blocks with text surfaces that you want the artificial horizon displayed.
    • Blocks with text surfaces include: Cockpits, flight seats, programmable blocks, and console blocks
    • Configure which text surface the horizon is displayed on within the block's custom data (You don't need to do this for text panels). The default config will be populated automatically.

  4. Enjoy!

Optional steps
  • Place the word Reference in the name of the ship controller that you want use to orient the the artificial horizon.
    • If you do not specify, the code will automatically detect and use the seat you are controlling the ship from.
  • Place the word Horizon in the name of any sound blocks you want to use for ground collision warnings.
    • Make sure to select a sound to play on the sound block. You can configure the loop interval in the custom data of the programmable block.

How to read the XYZ axes



You can change how the artificial horizon looks and behaves within the Custom Data of the programmable block this script is running from. Simply open the custom data, modify it, and click "Ok". The code will update to reflect these changes within 10 seconds at most.



Can I customize the colors?
Yes, in the custom data of this programmable block.

Does this work with the new cockpit LCDs?
Yes.

Can I have an Artificial Horizon and a Radar on different cockpit screens?
Yes, as long as they are configured to write to different cockpit screens, my scripts will not conflict.

Will this work with Configurable Auto LCDs 2?
Yes. Simply append the CAL2 configuration to the END of the Custom Data like so:
Artificial horizon configuration --- Auto LCD configuration
The three hyphens (---) need to go after everything else in the Custom Data, but before the Auto LCD configuration.

Do you have an Elite Dangerous color scheme that matches the Radar script?
Yes! Check out the presets below in the Color Schemes discussion!


Be sure to report any bugs below in the Bug Reports discussion. Hope y'all enjoy :)

(Do not reupload without permission, not even to mod.io)
Popular Discussions View All (3)
11
Oct 17, 2024 @ 4:47pm
PINNED: Bug Reports
Whiplash141
7
May 5, 2021 @ 8:20pm
PINNED: Color Schemes
Whiplash141
0
Apr 27, 2024 @ 3:57am
Feature Idea: In space "reference horizon" within "docking range".
Leconite
238 Comments
Whiplash141  [author]
Jun 28 @ 2:40pm 
@wellohead
What version are you using? Because the currently live version does not have that issue.
Jun 28 @ 9:04am 
Well, concerning my previous issue, it seems to work if you cast both the 0 as byte and the whole call as byte.
Jun 28 @ 8:55am 
Hi! I'm trying to use the script but I get the following error when I do a Check Code:
"Program[857,45]: Error: The call is ambiguous between the following methods or properties: 'MathHelper.Clamp(int, int, int) and 'MathHelper.Clamp(byte, byte, byte)'.
Is there a known fix for this? Thanks.
May 23 @ 4:44am 
Thank you! !
Whiplash141  [author]
May 22 @ 8:31pm 
"With proper credit of course."

Sure :)
May 22 @ 6:17am 
Hi Whip. Would you object to a ship potentially releasing to workshop this year including a modified version of your script? With proper credit of course.
The edit would be allowing it to hook into another script by sending arguments to a PB acting as an alarm controller to set off alerts for the pilot. Additionally considering the option to define a "Bank Angle" alerting threshold to notify in a manner similar to the current "Pull Up" warning.
Feb 10 @ 2:57am 
Understandable, appreciate the quick reply, and the script. It's really nice to have an actual useful HUD when playing planetside,
Whiplash141  [author]
Feb 10 @ 2:38am 
No, that is a game limitation
Feb 10 @ 2:18am 
Tried to look it up but couldn't find it. Is there a way to increase the refresh rate of the screen? It's a bit jarring when doing fast maneuvers...
Aug 31, 2025 @ 8:48am 
Totally understandable, deploying it in a large grid LCD block of some type is usually how I use it too.
Can't really read it otherwise.