Slidenodes and Rails

Slidenodes are nodes that move along predefined rails. Common applications include steering racks and some suspension components like macpherson struts.

Slidenodes

Slidenodes need to have a node and rail already created to work, as they refer to both. Keep in mind that the node needs to be precisely aligned with the rail, otherwise you might experience issues as the node aligns itself on spawn.

"slidenodes": [ 
     ["id:", "railName", "attached", "fixToRail", "tolerance", "spring", "strength", "capStrength"],
 
     ["nodename", "Rail1", true, true, 0, 10000000, 100000000, 345435],
],

Required Arguments

string
type
The name of the node you want attached to the rail
This should match a node that has been defined in the nodes section
string
type
The name of the rail that this slidenode will be attached to
boolean
type
true
default
Specifies if the slidenode will initially be attached to the rail or not.
boolean
type
true
default
Moves the slidenode to be on the rail (or if tolerance is defined, it moves it close to the rail).
number
type
Distance from the rail (m) before rail forces are applied to the node.
number
type
Force that holds the node to the rail (N/m).
number
type
Force at which the node will separate from the rail (N).
number
type
The strength of the caps (N).
Caps are the start and end nodes of the rail. If capped=false, the slidenode will slide out of the rail when it reaches the end and detach from it. If capped=true, then it will stop there held by the capStrength force.

Rails

Rails are the tracks for slidenodes. They consist of one or multiple sections that are defined using nodes.

A rail can consist of multiple segments, and those segments do not have to be in a straight line.

"rails": {
      "Rail1":{"links:":["node1", "node2", "node3", "node4"], "broken:":[], "looped":false, "capped":true}
},

Required Arguments

string
type
The name of the rail
This is the first argument, before the curly brackets. It matches with railName in the slidenodes section.

table
type
List of nodes that will form the rail. This list should be at least two nodes.
"links:":["node1", "node2"],
"links:":["node1", "node2", "node3", "node4"],
table
type
[]
default
Which nodes from the links table should be treated as broken.
Legacy argument, not used anymore.
boolean
type
false
default
If your rail is a complete circuit, change it to true and it will allow the node to continue circuiting without stopping.
boolean
type
false
default
If the rail has caps, or blockers at the end of it to keep the node from sliding off.
Caps are the start and end nodes of the rail. If capped=false, the slidenode will slide out of the rail when it reaches the end and detach from it. If capped=true, then it will stop there held by the capStrength force.

Rails2

New in version 0.38, the rails2 section is the same as rails, with the same arguments, but formated differently, more in line with the other Jbeam sections.

//these two are exactly the same
"rails": {
      "Rail1":{"links:":["node1","node2","node3"], "broken:":[], "looped":false, "capped":true},
      "Rail2":{"links:":["node4","node5"],         "broken:":[], "looped":false, "capped":true},
},
"rails2":[
    ["id",    "links:",                  "broken:","looped","capped"],
    ["Rail1", ["node1","node2","node3"], [],        false,   true   ],
    ["Rail2", ["node4","node5"],         [],        false,   true   ],
],

The advantage of this syntax over the standard rails is being able to make the rail id dynamic using functions , so that a single part can be reused multiple times with different rail names each time (previously, it was possible for all Jbeam sections except rails).

Simple Example

A typical example of rail and slidenode usage is the steering rack.

"rails": {
    "steeringrack":{
        "links:":["fh6r", "fh6l"], "broken:":[], "looped":false, "capped":true,
    },
},
"slidenodes": [
    ["id:", "railName", "attached", "fixToRail", "tolerance", "spring", "strength", "capStrength"],
    ["st1r", "steeringrack", true, true, 0.0, 18001000, "FLT_MAX", "FLT_MAX"],
    ["st1l", "steeringrack", true, true, 0.0, 18001000, "FLT_MAX", "FLT_MAX"],
],

Advanced Example

Using rails2 with functions allowing for dynamic rail names.

"rails2": [
    ["id", "links:", "broken:","looped","capped"],
    ["$= $prefix .. 'r1'", ["1r", "5r"], [], false, true],
    ["$= $prefix .. 'r2'", ["3r", "7r"], [], false, true],
    ["$= $prefix .. 'l1'", ["1l", "5l"], [], false, true],
    ["$= $prefix .. 'l2'", ["3l", "7l"], [], false, true],
],
"slidenodes": [
    ["id:", "railName","attached", "fixToRail","tolerance","spring", "strength", "capStrength"],
    ["0r", "$= $prefix .. 'r1'", true, true, 0.0, 60000, 400000, 400000],
    ["0r", "$= $prefix .. 'r2'", true, true, 0.0, 60000, 400000, 400000],
    ["0l", "$= $prefix .. 'l1'", true, true, 0.0, 60000, 400000, 400000],
    ["0l", "$= $prefix .. 'l2'", true, true, 0.0, 60000, 400000, 400000],
],
Last modified: December 10, 2025

Any further questions?

Join our discord
Our documentation is currently incomplete and undergoing active development. If you have any questions or feedback, please visit this forum thread.