PcoWSkbVqDnWTu_dm2ix
We use cookies on this site to enhance your user experience
Collapse Sidebar

TextureLength

Beam

float

Sets the length of the Beams texture if Beam/TextureMode is ‘Wrap’ or ‘Static’. If Beam/TextureMode is ‘Stretch’ then it determines the size of the texture relative to the Beam's length.

Beam texture behavior

How a Beam|Beam's texture scales or repeats is dependent on the Beam/TextureMode property.

When Beam/TextureMode is ‘Wrap’ the size of the repeating texture is equal to TextureLength in studs. For an example of this see the image below:

beamTexture1

Note, the ‘Static’ Enum/TextureMode type is not used for Beams and therefore behaves identically to ‘Wrap’.

When Beam/TextureMode is set to ‘Stretch’ however the texture will be stretched relative to the beam’s length. The size of the texture relative to the Beam's length will be one over the TextureLength. In practice, this means the texture will repeat TextureLength times. For an example of this see the image below:

beamTexture2


Code Samples


Creating a Beam From Scratch

​This code sample demonstrates how a Beam effect can be created from scratch by creating a Beam, setting all of its properties and configuring it’s Attachments. See below for an image of the final result:

enter image description here