Space Engineers

Space Engineers

Thruster physics & Differential throttling
Engi 11 Apr, 2016 @ 9:53pm
Changes and improvements
Todays updates made a big difference. The "damper bounce" in the forward, backward, left and right directions is almost gone. It seems more prevalent in directions with more thrusters, like down and back. Down is still pretty significant. Not sure if that is fixible as you said due to the PID.

I noticed this from the beginning. But why does it take the "slop" out of heading changes? When you stop moving the mouse it stops rotation very quickly unlike without the mod where inertia carries the ships rotation a little further. Is it due to the thrusters dampening out the motion much more strongly than gyros can alone? I'm not sure how I feel about it. On one hand it makes it easy to turn to a heading with much more accuracy. On the other hand it feels unnatural being so precise.

< >
Showing 1-15 of 26 comments
Engi 11 Apr, 2016 @ 10:03pm 
Just tried turning gyros off. Still looses control at steep angles. I rolled to 90 degrees and the ship stopped rotation and the up thrusters would not fire to continue rotation. (ship has no down thrusters) If you are rolling quickly your inertia will carry you through some inverted manuevers but if you are rolling slowly and approach a 90 degree bank, you will loose rotation and plumet if your side thrusters cannot carry the weight of the craft alone. So no gyros at all is still not advisable if you plan on manuvering at high angles.
That slop/rotation inertia I mentioned above is definately more prevalent with the gyros off so it must be the thrusters and the gyros together making the ship handling very precisely. Maybe I can just get away with less gyros now and get the feel I'm used to and save some weight.
Also, you can definately feel it using the other thrusters in other directions to correct for unwanted rotation. Unbalanced ships fly much straighter now. Nice work there.
Last edited by Engi; 11 Apr, 2016 @ 10:09pm
Knsgf  [developer] 12 Apr, 2016 @ 12:42am 
Originally posted by KC Pilot:
Just tried turning gyros off. Still looses control at steep angles. I rolled to 90 degrees and the ship stopped rotation and the up thrusters would not fire to continue rotation. (ship has no down thrusters).
Yes, right now only limits on engines that face gravity directly are relaxed. Which means that you won't lose control when you pitch down, but still lose it when the bank angle exceeds 85 degrees. To regain control at steep bank hold SPACE.

Originally posted by KC Pilot:
Todays updates made a big difference. The "damper bounce" in the forward, backward, left and right directions is almost gone. It seems more prevalent in directions with more thrusters, like down and back. Down is still pretty significant. Not sure if that is fixible as you said due to the PID.
It's fixable: when acceleration gets close to zero, capture the I-term. Then when speed gets close to zero, reload the I-term with captured value. However, this needs to be done on each axis separately, which complicates things.

Originally posted by KC Pilot:
I noticed this from the beginning. But why does it take the "slop" out of heading changes? When you stop moving the mouse it stops rotation very quickly unlike without the mod where inertia carries the ships rotation a little further. Is it due to the thrusters dampening out the motion much more strongly than gyros can alone? I'm not sure how I feel about it. On one hand it makes it easy to turn to a heading with much more accuracy. On the other hand it feels unnatural being so precise.
Here is an interesting fact: in old source project, which kept firing thrusters at full blast all the way to zero rotation, the stopping was even more stiff and abrupt. I actually had to artificially throttle down the engines at low angular velocities as well as devise the algorithm that can more or less reliably choose whether this "toning down" is appropriate.

P.S. Have you tried Flight Assist again and does it work?
Last edited by Knsgf; 12 Apr, 2016 @ 6:03am
Engi 12 Apr, 2016 @ 11:34am 
I did try flight assist very quickly and I did not notice the problem I had before with it cutting thrust so drastically. I will try testing it more extensively. I will try holding space, that makes sense that it would help.

The plus side to the precise manuevering is that I don't need to turn gyros down as much when targeting something while using a zoomed in camera as it is much easier to be more precise while moving the cursor onto the target, so that is a good thing.
Engi 12 Apr, 2016 @ 12:10pm 
I can't find any problems with this mod and Flight Assist now. It seems to work quite well together.

What's up with the undocking with thrusters on and the ship goes crazy? Is that fixable as well? If I land on an uneven surface and don't lock all my gear and have my thrusters off when I unlock the gear, it will fall a little to level itself on the surface due to gravity. So I always turn my thrusters on before unlocking but now I can't or the ship will go nuts.It seems like it is the physics bug that occurs sometimes when unlocking gear because the ship not only goes nuts but it also seems to have physics not working right as parts of the debris after the inevitable crash seem to float and not obey physics.

The space bar thing makes thruster work when inverted like you said.
Last edited by Engi; 12 Apr, 2016 @ 12:23pm
Knsgf  [developer] 12 Apr, 2016 @ 12:41pm 
Originally posted by KC Pilot:
What's up with the undocking with thrusters on and the ship goes crazy? Is that fixable as well? If I land on an uneven surface and don't lock all my gear and have my thrusters off when I unlock the gear, it will fall a little to level itself on the surface due to gravity. So I always turn my thrusters on before unlocking but now I can't or the ship will go nuts.It seems like it is the physics bug that occurs sometimes when unlocking gear because the ship not only goes nuts but it also seems to have physics not working right as parts of the debris after the inevitable crash seem to float and not obey physics.
I have a hard time following you here. Does this happen every time you undock it or only under specific conditions?
Engi 12 Apr, 2016 @ 1:11pm 
Well I'm trying to reproduce it but the weirdest thing is happening. All of this testing on your mode has been done with a mass rename script that renames by ship "Thrusters - All" group to include [THR] and/or [STAT] into the names of the thrusters but now that script has suddenly stopped working. I used it this morning but now it wont work...I find it weird that when no update occurs, as there was not one today, suddenly things that have worked, stop working or their behavior changes...actually I just realized that all my scripts stopped working...what the? They all have the caught exception no main method available and the too complex errors. I've been using this save for the past week and they all worked fine until just now...Anyways, I'll have to manually rename the thrusters and recreate the issue and see what specific situations it happens in and doesn't.
Engi 12 Apr, 2016 @ 1:31pm 
Ok so even when thrusters are not tagged, this mod causes a kind of jump off the landing pad when the thrusters and dampers are on and you unlock the landing gear from the landing pad. In my testing it has always been the right side of the ship that jumps up about 1 block in height when you unlock the landing gear. Then it just sits there since dampers are on at a angle with the left landing gear still touching the pad. I removed the mod and this does not happen at all. And no thrusters were tagged in those tests. Put the mod back on and it does the exact same thing, one side of the ship jumps up off the pad when gear are unlocked and it just hovers there at a angle. You can fly it away as thought nothing happened so the effect is just momentary. Does not do it at all with dampers off.

Then I tagged the thrusters manually [THR] since scripts aren't working. Now when ever the thrusters are on and dampers are on or off, and you unlock the landing gear it hops off the pad and starts to buck and pitch and roll in all directions like physics is messed up with thrusters pulsing. You can still control the ship but barely, eventually you loose the battle and it flips over and smash. If you have the thrusters off and unlock the gear, this does not happen. This is what I thought you were talking about in your description when you said turn tagged thrusters off when docked or you will loose control.

After the ship flips over and crashes, some of the debris has no physics and will just float there in the air or slightly drift in the air or along the ground in some random direction. This makes me think it is related to that physics bug that happens sometimes when you unlock landing gear and physics gets all weird for the ship. However, that happens very rarely in the vanilla game. With this mod it happens every time.
Last edited by Engi; 12 Apr, 2016 @ 1:40pm
Knsgf  [developer] 12 Apr, 2016 @ 5:10pm 
Originally posted by KC Pilot:
Ok so even when thrusters are not tagged, this mod causes a kind of jump off the landing pad when the thrusters and dampers are on and you unlock the landing gear from the landing pad. In my testing it has always been the right side of the ship that jumps up about 1 block in height when you unlock the landing gear. Then it just sits there since dampers are on at a angle with the left landing gear still touching the pad. I removed the mod and this does not happen at all. And no thrusters were tagged in those tests. Put the mod back on and it does the exact same thing, one side of the ship jumps up off the pad when gear are unlocked and it just hovers there at a angle. You can fly it away as thought nothing happened so the effect is just momentary. Does not do it at all with dampers off.
I've managed to reproduce this bug in vanilla too. It usually, but randomly happens in a freshly loaded save on a ship locked with landing gear and connectors simultaneously.

Originally posted by KC Pilot:
Then I tagged the thrusters manually [THR] since scripts aren't working. Now when ever the thrusters are on and dampers are on or off, and you unlock the landing gear it hops off the pad and starts to buck and pitch and roll in all directions like physics is messed up with thrusters pulsing. You can still control the ship but barely, eventually you loose the battle and it flips over and smash. If you have the thrusters off and unlock the gear, this does not happen. This is what I thought you were talking about in your description when you said turn tagged thrusters off when docked or you will loose control.
There was an obscure division by zero in mod's code that would occasionally trigger when undocking from a station. Fixed it.
Engi 12 Apr, 2016 @ 5:13pm 
That bug in vanilla is different than the one I'm describing. I'm aware of that one and you're right it is random. However, what I am describing happens every time, not random at all. It's very consistent.
Engi 12 Apr, 2016 @ 5:39pm 
I just tested again and the fix you made worked. Ship no longer goes crazy after unlocking landing gear. Thanks. Still bounces up slightly everytime if dampers are on and you unlock gear and does not do that when mod is not loaded in game. There is also an impact sound coming from the landing gear "kicking" off the landing pad. Does not seem to do it as much when unlocking from the ground.
Last edited by Engi; 12 Apr, 2016 @ 6:02pm
Knsgf  [developer] 13 Apr, 2016 @ 3:46am 
Originally posted by KC Pilot:
However, what I am describing happens every time, not random at all. It's very consistent.
In regular flight mode, the course hold routine remains active at all times, unless you manually switch all [THR] and [THR][STAT] thrusters off. So when you land the ship at a slight angle, turn inertia dampers off then switch them back on without toggling the engines first, the ship will immediately try to rotate to its previous heading and attitude, pushing itself up. This is another reason why I included a landing mode -- it disengages course hold off automatically as soon as touchdown is made.
Engi 13 Apr, 2016 @ 8:00am 
So the course hold works even when thrusters are not tagged? Because that kick up happens then too, with no thrusters tagged.
Engi 13 Apr, 2016 @ 8:22am 
So is it possible to get pirate ships to work with this mod with some additional programming or is it not possible at all?
Knsgf  [developer] 13 Apr, 2016 @ 8:57am 
Originally posted by KC Pilot:
So the course hold works even when thrusters are not tagged?
No, couse hold requires at least one tagged engine to be active. I've also found a reliable way to reproduce this issue in both modded and unmodded worlds:
1. Land the ship on a static platform,
2. Disable ID,
3. Without leaving the cockpit, save the game, leaving landing gear unlocked,
4. EXIT THE GAME COMPLETELY (mere reload won't trigger this bug),
5. Restart the game and load the world,
6. Lock the gear,
7. Turn ID on,
8. Unlock the gear. The ship will get trampolined into the air with 100 % certainity. In unmodded world the vessel will head straight up. In a modded world the ship will tilt.

What I believe happens is that when the gear is unclamped and the ship becomes a dynamic entity again, the game (not the mod) fires some of its engines on its own for a split second. Because untagged thrusters are not controlled by the mod in any way, this kick can continue unchecked. However, if engines are tagged, then the mod instantly sees the movement that doesn't make any sense and promptly returns the ship to the correct position.

Originally posted by KC Pilot:
So is it possible to get pirate ships to work with this mod with some additional programming or is it not possible at all?
In theory, yes. You'll need to leave 6 untagged thrusters and use script-based autopilot. The RC autopilot will still not work.
Last edited by Knsgf; 13 Apr, 2016 @ 10:01am
Engi 13 Apr, 2016 @ 10:01am 
So is there a way to do a mod that would automatically tag and not tag some of the thrusters for the pirate drones and ships so they can fly somewhat normally? Because currenlty this mod is really just a proof of concept as you state in the description, a really good one, but without enemies that can move it really makes combat with pirates pretty lame.
< >
Showing 1-15 of 26 comments
Per page: 1530 50