This documentation is for a prerelease version of O3DE. Click here to switch to the latest release, or select a version from the dropdown.

Version:

Tube Shape Component

The Tube Shape component creates a transparent, enclosed cylindrical volume that’s fit to a Spline component. The dimensions of the tube can be edited with the Radius and Variable Radius properties, and by editing the Spline component. The Tube Shape component is not a mesh, but rather a helper geometry that can be used to define volumes for shape gradients, audio, vegetation, PhysX, and any application that can utilize the Shape EBus. For more information on using Shape components, see Shape components.

Provider

O3DE Core (LmbrCentral) Gem

Dependencies

Spline component

Tube Shape properties

Tube Shape component properties

PropertyDescriptionValuesDefault
VisibleEnable to always display the shape in the viewport, even when the entity is not selected. Disable to hide the shape when the entity is not selected.BooleanEnabled
Game ViewEnable to display the shape while in game mode.BooleanDisabled
FilledEnable to display the shape as filled. Disable to display the shape as a wireframe.BooleanEnabled
Shape ColorThe color of the shape.Eight bits per channel color: 0-255255,255,199
Tube Shape - RadiusThe uniform radius that defines the Tube Shape’s width.0.1 to Infinity1.0
Tube Shape - Variable RadiusThe Variable Radius property contains a list with one item for each point of the spline backbone. The list values are added to the uniform Radius values for the corresponding points on the spline to create a tube with a variable radius at each point.0.0 to Infinity0.0
EditChoose the Edit button to enter Edit mode. In Edit mode, you can modify the dimensions of the shape in the viewport using the methods outlined in Edit mode actions below. While in Edit mode, the Edit menu in the menu bar displays available actions and hotkeys. To exit Edit mode, choose Done in the component interface.

Edit mode actions

  • Left-click and drag the black handles at each spline point in the viewport to modify the Variable Radius for each section of the Tube Shape.

TubeShapeComponentRequestsBus

Use the following request functions with the TubeShapeComponentRequestsBus EBus interface to communicate with Tube Shape components in your game.

Request NameDescriptionParameterReturnScriptable
GetRadiusReturns the Radius of the tube.NoneRadius: FloatYes
GetTotalRadiusReturns the total interpolated radius of the tube. This is the sum of the radius and the variable radius.Index: IntegerTotal Radius: FloatYes
GetVariableRadiusReturns the Variable Radius along the spline.Index: IntegerVariable Radius: FloatYes
SetRadiusSets the Radius of the tube.Radius: FloatNoneYes
SetVariableRadiusSets the Variable Radius of the tube at a spline point.Index: Integer, Radius: FloatNoneYes

Refer to Shape component Ebus interface for a description of functions that are available to all Shape components.