Mechanical Blocks

From Space Engineers Wiki
Jump to navigation Jump to search

In Space Engineers, the mechanical blocks are:

In contrast to other blocks, mechanical blocks can move and pull attached subgridss with them. Use them to build parts that turn (rotor), tilt or fold (hinge), or extend and retract (pistons). Rotors and hinges can move actively, or passively, or be locked. Pistons can only move actively, they are neither coil springs nor suspensions.

Video: A beautiful example how to use mechanical blocks, by Squeegy Mackoy (2013/2023)

Usage

You can use mechanical blocks to build grids with extending drill/welder/grinder arms, crane arms, mecha "wings" and walker legs, large foldable hangar doors, collapsible landing legs, rotating vector thrusters, elevators, and much more. You can even use them to keep subgrids statically locked in an angled position for decorative purposes.

To control the movement of mechanical blocks, read more about Custom Turret Controllers, Timer Blocks, Event Controllers, and Scripts.


Use rotors, pistons, and hinges to create angled, cross bracing, or moving subgrids. Image credit: BlackArmor.

What Are Subgrids and why do I care?

Think of a spaceship with foldable landing gear and vector thrust: The blocks attached through mechanical blocks (here, the landing gear on hinges, and the thrusters on rotors) will appear in different colors in your ship's Control Panel Screen. These attached grids are referred to as subgrids.

This is relevant, because subgrids are treated differently as far as steering is concerned, in a way that will have an impact on your flying/driving:

  • The Inertial Dampers do not consider subgrid mass
  • Wheels and thrusters on subgrids are not controlled by cockpit input from the main grid

Read more about subgrids to understand the pros and cons, and learn about workarounds to fix these steering limitations, using scripts.

What are Hitboxes and why do I care?

When connected to form subgrids, mechanical blocks can push blocks “into” one another; such physically impossible states generate vibrations that shake the grid apart violently (also known as Clang).

This is because the physics simulation uses an optimisation where it measures collisions only by looking at simplified invisible collision shapes called hitboxes. Version/1.196 released in 2020 decreased oversized hitboxes of blocks and armor to represent the shape of the blocks more appropriately, which resolved many clanging issues, and multiplied the possibilities of smoothly working mechanical constructions. Still, be careful and don't place any blocks inside the range of mechanical blocks, or your vehicle will shake itself apart.

How to control Mechanical Blocks?

Assign Reverse/Extend actions to your toolbat, and also increase/decrease mininum maximum. By combining these actions, you can control the movement of mechanical blocks.

You may have a situation where you want to save several min and max values. E.g. a custom extending welder arm is either folded up and stowed for transport, or it’s unfolded and extending between it’s minimum and maximum. A ship ramp may be closed to form sealed door, or unfolded to be horizontal footbridge, or to be a sloped ramp. In short, mechanical device may have a closed/stowed position and a working range. You can set up a minimum and a maximum range for rotors, hinges and pistons, but that does not leave room anymore to set up the stowed position. From version 205 on, you can predefine multiple target values and save them under a named label. When you then set another value, you can give it a separate label. This way, several set-value actions can co-exist on the toolbar, and you can switch between stowed min/max or working min/max.

How to Improve Stability?

Anchoring

In general, it's safest to use the mechanical blocks on static grids, such as cranes on your base.

Especially for mobile grids, lock the main grid to the ground with Icon Block Landing Gear.png Landing Gear while subgrids (such as drill arms) are moving mechanically. Magnetic Landing Gear will temporarily turn a mobile main grid static. If immobilisation is not an option, setting Icon Block Gyroscope.png Gyroscopes on a zero RPM override helps reduce shaking.

More mass for in-between grids

When you have a chain of connected mechanical blocks, the mass of the in-between grids will determine how rigid the physical link is.

The solution to that is to add more mass to the in-between grids. You can use artificial mass or gyros as they're very heavy and small (and can also be turned off, their function is not important for this).

For example, when building a custom turret, it generally has 3 grids involved: Ship+Rotor -> RotorTop+Hinge -> HingeTop+Guns.
If rotating it around (using a Icon Block Custom Turret Controller.png Custom Turret Controller or whatever else) makes it wobble about, you need to make the in-between grids (in this case it's the RotorTop+Hinge) as close as possible to the mass of the HingeTop+Guns grid, or even heavier if possible. This will result in a very rigid turret, which means more accuracy.

Sharing inertia tensor

First, to understand what the inertia tensor is in a physics simulation: This property defines how the mass is distributed when rotating. For example, a long ship can roll fast, but pitch and yaw are slow by comparison. More details on the inertia tensor.

The Share Inertia Tensor setting on mechanical blocks can possibly stabilize a grid's rotation. This option is only available in Experimental mode and requires enabling in World Settings too as of SE v1.206.

On the Control Panel Screen, enable the Share Inertia Tensor option on a chain of wobbly moving mechanical blocks to stabilise them.

  • Do not enable this option on the first mechanical block that’s directly attached to a static or heavy grid (e.g. to a base or spaceship).
  • Only enable this option on mechanical blocks that are attached in between to other mechanical blocks, and on non-heavy blocks (e.g. a block tool or block weapon).

Sharing the inertia of a heavy or static grid will weigh down the whole mechanical construction and render it sluggish or immobile!

This combination of settings equalises the virtual masses of the moving parts to achieve more stable (albeit a physically unrealistic) behaviour of the physics simulation.

Do not enable "Share inertia tensor" on the mechanical blocks that touch a static grid

How Does Cross Bracing Stabilise Mechanical Grids?

Space Engineers doesn’t care about tensile strength in static grids, but bending and vibrations become noticeable in mobile grids and mechanical blocks. Or, sometimes you struggle with hinges and rotors being to weak to lift heavy subgrids. How to fix this wobbliness?

A strong crane arm stabilised by two extra pistons on rotors used as cross braces. (Image credit: Splitsie)

Stabilise weak Hinges by adding a flexible diagonal support: The most common cross brace is a piston attached by two rotors.

  • If you use cross bracing pistons, you must actively extend and retract the pistons to control the movement; and you must make the neighbouring rotors and hinges passive by setting a low braking value, no velocity, and no rotor/hinge lock.
  • Do not attempt to actively turn the cross-braced hinges and rotors, because pistons are stiff and cannot be pushed or pulled like spring suspensions in real life.

Videos

Crane Tutorial by Splitsie

Drive Shaft demo by Kennet0508