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 strenght 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"], "looped":false, "capped":true}
},

Required Arguments

string
type
The name of the rail

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"],
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
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.

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"],
],
Last modified: July 10, 2024

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.