Up to date

This page is up to date for Godot 4.2. If you still find outdated information, please open an issue.

TubeTrailMesh

Inherits: PrimitiveMesh < Mesh < Resource < RefCounted < Object

Represents a straight tube-shaped PrimitiveMesh with variable width.

Description

TubeTrailMesh represents a straight tube-shaped mesh with variable width. The tube is composed of a number of cylindrical sections, each with the same section_length and number of section_rings. A curve is sampled along the total length of the tube, meaning that the curve determines the radius of the tube along its length.

This primitive mesh is usually used for particle trails.

Tutorials

Properties

bool

cap_bottom

true

bool

cap_top

true

Curve

curve

int

radial_steps

8

float

radius

0.5

float

section_length

0.2

int

section_rings

3

int

sections

5


Property Descriptions

bool cap_bottom = true

  • void set_cap_bottom ( bool value )

  • bool is_cap_bottom ( )

If true, generates a cap at the bottom of the tube. This can be set to false to speed up generation and rendering when the cap is never seen by the camera.


bool cap_top = true

  • void set_cap_top ( bool value )

  • bool is_cap_top ( )

If true, generates a cap at the top of the tube. This can be set to false to speed up generation and rendering when the cap is never seen by the camera.


Curve curve

  • void set_curve ( Curve value )

  • Curve get_curve ( )

Determines the radius of the tube along its length. The radius of a particular section ring is obtained by multiplying the baseline