Space Engineers

Space Engineers

54 ratings
Delta Steering
   
Award
Favorite
Favorited
Unfavorite
File Size
Posted
Updated
14.644 KB
17 Aug, 2019 @ 3:14pm
25 Apr, 2020 @ 11:22am
8 Change Notes ( view )

Subscribe to download
Delta Steering

Description
The idea
This script implements an alternative steering method commonly found in modern space games. The farther you move your mouse from the center of the screen, the faster your ship rotates.

It stores the state of that rotation, so you can even leave cockpit or use alt-mouse to look around without disrupting your maneuver.

It adds some immersion and helps doing smooth turns, especially useful on big ships that are usually steered by keyboard arrows.

I've included visual indication either to cockpits' screens or dedicated LCD, up to your preference.

Gyro override is toggled by spacebar double tap, no toolbar setup needed.

Added setting to make fonts larger (interfaceUpscale), 2 is recommended for large grid LCD. Remember to include floating point literal if you are using those values (e.g. "interfaceUpscale = 1.7f").

Dead zone can be set by "deadZone = 0.00f". This is a percentage starting from dead center, so at 0.05 the dead zone would be 5% of panels' "radius".

Usage
  1. Paste the code
  2. Make sure you have needed blocks. "forward-gyro" is the gyro in control. You should have only one, other gyros will assist it automatically at full power. That gyro should be oriented correctly, it matters (the keypad should face forward of your ship) Now this is not needed, the rotation is determined by players' cockpit, all gyros will have correct overrides.
  3. Make optional adjustments (all config variables are found at the top part of the code with comments)
  4. Hop into cockpit. You should be able to see interface at one of the screens (changed by "currentScreenIndex" var). For external screen, name it "LCD delta steering" or change the name in the code ("priorityLcdName") according to your preference. Gyro override is toggled by spacebar double tap.

Variables
  • priorityLcdName = "LCD delta steering"; // have this LCD to ignore cockpits' screens

  • currentScreenIndex = 0; // will output to that screen if there are no dedicated LCD (set it to SCRIPT content and None in predefined scripts). This is the index of internal cockpits' screens. You can change it to 1, 2, 3 etc to use different cockpit (or control seat) screen.

  • swapRollYaw = false; // airplane-style steering

  • deadZone = 0.10f; // dead zone, from 0 to 1

  • interfaceUpscaleLargeGrid = 2f; // scaling the LCD output stuff on large grids

  • interfaceUpscaleSmallGrid = 1f; // scaling the LCD output stuff on small grids

  • quadraticDebuff = true; // x^2 control torque in the {0, 1} range. Change to false to have 1 to 1 linear input.

  • centerOffsetY = 0; // vectical offset in meters. Use -0.5f if you want Transparent LCD indication be aligned with crosshair.

  • tieToSpecificController = "Flight Seat Forward"; // adviced for big builds with lots of remcons/seats serving different purposes. Set this to your main cockpit/remcon. If this fails then the script would listen to all ship controllers.

  • inputDecayMult = 1f; // to have the control vector return to central position automatically set this value close to but less than 1 (0.99f works well, the less the value the faster it goes)
41 Comments
jglenn1562 22 Apr, 2022 @ 11:47am 
All good, it doesn't matter all that much, because now that I think of it, it would be pointless to have the HUD available in the battle bridge since it's buried and only possible to navigate in 3rd person hahaha!
cheerkin  [author] 22 Apr, 2022 @ 7:18am 
Currently, no. You can use internal screens of the cockpits in this manner, but if you use LCD then it's single. I can do something about it in the next version.
jglenn1562 21 Apr, 2022 @ 9:19pm 
Is it possible to output the display to more than one LCD? I got two bridges (battle and standard nav bridge) that I want to see the PB's output in.
DeltaWing 9 Jan, 2021 @ 8:55pm 
thank you!
cheerkin  [author] 9 Jan, 2021 @ 5:32am 
Find this line in the code:
UserCtrlTest.Cumulative += r;
Add this line immediately after:
UserCtrlTest.Cumulative.X = 0;
DeltaWing 6 Jan, 2021 @ 2:28pm 
is it possible to disable one of the axis? (I have a boat and only wish to have yaw)
cheerkin  [author] 25 Apr, 2020 @ 11:27am 
Looks not terribly useful imo but I added that in todays' update. Have fun.
MaXiMuM4D 24 Apr, 2020 @ 3:51pm 
Actually, NVM.

It's probably what i mean,t but we have diffrent definitions of it, lol.

Do it! : D
MaXiMuM4D 24 Apr, 2020 @ 3:49pm 
Mh no, that's not the same

imagine the joystick that you have on your ingame LCD, getting pulled back to the center, slowly, instead staying in place (unless i move the mouse, or reset with spacebar)

cheerkin  [author] 24 Apr, 2020 @ 3:03pm 
I think you're suggesting a kinda "define desired direction by mouse delayed" mode, like move mouse pointer to a direction you want your craft to turn to, then wait while the automation turns the grid there for you.