Version:

Tube Shape

Tube Shape


This feature is in preview release and is subject to change.

Create tube-like volumes along a spline by using the Tube Shape component. To create a tube shape, add the Spline component to an entity to define its shape. In the Tube Shape component, define a radius to control its volume. You can specify a different tube radius at each vertex in the spline.

Note
The Tube Shape component requires the Spline component.

Topics

Example Tube Shape Component

[Example Tube Shape component in Lumberyard Editor.]

Tube Shape Properties

[The Tube Shape component and its properties in Lumberyard Editor.]

The Tube Shape component has the following properties.


NameDescription
VisibleThe component always appears in the viewport, even if the entity isn’t selected.
Game ViewRenders the shape in game mode. To enter game mode, press Ctrl + G.
Shape ColorSpecifies the color to render the shape.
RadiusThe radius of the tube.
Variable RadiusDefines the variable radius at each point along the spline. This value is added to the radius to calculate the final radius of the tube.
EditChoose Edit, and the component is locked for editing. For more information, see Editing Components in the Viewport.

EBus Request Bus Interface

You can use the event bus (EBus) interface to communicate with other components in your game. For more information, see Working with the Event Bus (EBus) system.


Request NameDescriptionParameterReturnScriptable
GetRadiusReturns the radius of the tube.VoidFloatYes
GetTotalRadiusReturns the total interpolated radius of the tube. This is the sum of the radius and the variable radius.SplineAddressFloatYes
GetVariableRadiusReturns the variable radius along the spline.IntFloatYes
SetRadiusSets the radius of the tube.FloatVoidYes
SetVariableRadiusSets the variable radius of the tube at a spline point.Int, FloatVoidYes

Example
The following script uses the request bus interface.

function Script:OnActivate()
    TubeShapeComponentRequestsBus.Event.SetRadius(self.entityId, 5.0);  
end