Nodes

Nodes

From BeamNG

Revision as of 00:20, 4 November 2019 by Toron Beldevar (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Nodes

Nodes


NodeBeamInfo.png

Nodes are the core of BeamNG physics. Everything revolves around these mass points. A node itself is a dimensionless (infinitely small) mass point in 3D space. Each node is a list of four values, corresponding to the header at the top of the nodes section. Nodes can have any string for their name, as long as the names do not conflict. A good naming scheme is some memorable/relevant letter, followed by a number, followed by a letter signifying which side of the vehicle it's on. For example, the 1st rightmost frame node would be called "f1rr" while the 3rd left frame node would be called "f3l". A node sitting in the middle (posX = 0) would have no letter suffix.

This is an example of a nodes section. Nodes also have many properties which can be set by placing dictionary lines above the nodes which are desired to be affected. Node weights are in kilograms, and coordinates are in meters. The "group" modifier is for assigning flexbodies. Node material only affects sound and particle properties, not physics.


Arguments

Arguments

Name Type Optional Default Value Description
id string NOk n/a defines the node name
posX float NOk n/a The X (left/right) position in 3D space
posY float NOk n/a The Y (forward/back) position in 3D space
posZ float NOk n/a The Z (up/down) position in 3D space
nodeWeight float Ok options.nodeWeight The weight of the node in kg
collision boolean Ok true If the node can collide with the world
selfCollision boolean Ok false If the node can collide with the vehicle
group string Ok n/a Groups a select set of nodes into a group
frictionCoef float Ok 1.0 Friction of the node
nodeMaterial bitmask Ok options.nodeMaterial Material of the node, rubber, metal, etc.
fixed boolean Ok false If the node is fixed (Can't move at all)
surfaceCoef 32px Ok 0.1 Makes a node have more or less drag area in ground models with depth
volumeCoef 32px Ok 0.1 Makes a node more or less buoyant in ground models with depth
pairedNode 32px Ok null This can be used to i.e. link double tires together

Generated Options

  • cid
  • creator
  • name
  • type
  • pairedNode


Simple Example

Simple Example

	 "nodes" :[
		 ["id", "posX", "posY", "posZ"],
		 ["n1rr", -0.90, -0.93, 0.23],
		 
	],


Advanced Example

Advanced Example

	 "nodes" :[
		 ["id", "posX", "posY", "posZ"],
		 {"group":"body"},
		 {"selfCollision":false}
		 {"collision" :true}
		 {"nodeMaterial":"|NM_METAL"},
		 {"frictionCoef":0.7},
		 {"nodeWeight":12.5},
		 //a comment
		 ["n1rr", -0.90, -0.93, 0.23],
		 ["n1r", -0.33, -0.95, 0.23],
		 ["n1l", 0.33, -0.95, 0.23],
		 ["n1ll", 0.90, -0.93, 0.23],
		 {"group":""},
		 
	],

Nodes can also be assigned to multiple groups on an individual basis, as per the following example:

	["f6ll", 0.76, -0.72, 0.83{"group":["coupe_engine_bay","coupe_windshield"]}],
Vehicle Creation
Get started: Introduction to Vehicle Creation
JBeam
Overview
Physics
Dynamics
Visuals
Extras
Upkeep
Deprecated
See also: JBeam ExamplesJBeam Physics Theory