Collision Triangles

Collision Triangles

From BeamNG

Collision Triangles

Collision triangles are essential for inter-vehicular collisions, they are flat surfaces defined by 3 nodes. These surfaces are the basis of collisions, allowing nodes from other vehicles to collide with.

Collision triangles also have hydro-physics, aero-physics, and can be used for building things like plane wings, or even helicopter rotors. Your vehicle will need collision triangles for air resistance and accurate collisions.


Note: The ground effect is currently not simulated, however can be emulated by placing a wing where the ground effect would take place.

Placement

Collision triangles need to be placed in an anti-clockwise fashion for the best results. Start with the first node, second and third, forming an anti-clockwise circle. The inside of the triangles are generally weaker than the outside, so it's important to have you triangles facing the outside of the vehicle for the best results.

Collision Triangle marked in green

For the example picture, our node order would be "Node1", "Node2", "Node3" so it's going anti-clockwise.

	"triangles": [
			["id1:","id2:","id3:"],

			["Node1","Node2","Node3"],
			
	],

The above is how it would look inside the Jbeam file.


Arguments

Arguments

Name Type Optional Default Value Description
group string Ok n/a Groups a select set of tri's into a group
dragCoef string Ok 10 Air resistance
groundModel string Ok concrete Concrete, metal, wood, etc

Example of collision triangles with dragCoef and a set groundModel.

	"triangles": [
			["id1:","id2:","id3:"],

			{"groundModel":"metal"},
			{"dragCoef":10},
			["Node1","Node2","Node3"],
			
	],

dragCoef

dragCoef is a measure of how much a collision triangle is exposed to the air stream, from a particular direction.

  • Air drag is defined by percentage. (0-100%)
  • Air drag is calculated per triangle.
  • It can also be individually set per triangle.
  • It is applied the same to both sides of a triangle. There is absolutely no distinction between the two faces.
  • You should optimize your drag values, based on the primary directions that you expect that something is going to receive air from.

Tips for better results

  • For triangles that will be completely exposed to the air stream (like a spoiler), without much occlusion happening, you can set the full drag value (100).
  • For triangles that will be most of the time completely vertical to the air stream (like a door), you can set a close to realistic drag value (~70-100) because most of the time they'll receive 0 drag (when they are closed). When they are open, they'll receive full drag.
Vehicle Creation
Get started: Introduction to Vehicle Creation
JBeam
Overview
Physics
Dynamics
Visuals
Extras
Upkeep
Deprecated
See also: JBeam ExamplesJBeam Physics Theory