Space Engineers

Space Engineers

57 个评价
Delta Steering
   
奖励
收藏
已收藏
取消收藏
文件大小
发表于
更新日期
14.644 KB
2019 年 8 月 17 日 下午 3:14
2020 年 4 月 25 日 上午 11:22
8 项改动说明 ( 查看 )

订阅以下载
Delta Steering

描述
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)
44 条留言
Kittamaru 8 月 31 日 下午 1:37 
Yeah, tried that. I'll give it a shot in SP just to play with it :)
cheerkin  [作者] 8 月 30 日 上午 5:26 
Checked today, seems to be working. Make sure you recompile the script if you add more gyros, it needs to know all of them so no gyros without override are left when you switch.
Kittamaru 8 月 29 日 下午 7:26 
Just wanted to ask if this was still usable - tried it out and when I double tap space, the LCD screen updates as expected, but the ship still moves like normal mouse controls and doesn't continue to rotate?
jglenn1562 2022 年 4 月 22 日 上午 11:47 
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  [作者] 2022 年 4 月 22 日 上午 7:18 
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 2022 年 4 月 21 日 下午 9:19 
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 2021 年 1 月 9 日 下午 8:55 
thank you!
cheerkin  [作者] 2021 年 1 月 9 日 上午 5:32 
Find this line in the code:
UserCtrlTest.Cumulative += r;
Add this line immediately after:
UserCtrlTest.Cumulative.X = 0;
DeltaWing 2021 年 1 月 6 日 下午 2:28 
is it possible to disable one of the axis? (I have a boat and only wish to have yaw)
cheerkin  [作者] 2020 年 4 月 25 日 上午 11:27 
Looks not terribly useful imo but I added that in todays' update. Have fun.