Skip to content

Rect Segment

Creates a Rectangle made out of 2 triangle/wedges and positioned at a given point in the track.

RectSegment

Extends Segment

RectSegment : Segment {
    Wedge : WedgePart,

    P0 : Vector3,
    P1 : Vector3,
    P2 : Vector3,
    P3 : Vector3,
}

Properties

Wedge

The WedgePart used to make the rectangle. This will be cloned each time a new segment is created.

P0

Offset 1

P1

Offset 2

P2

Offset 3

P3

Offset 4

Constructors

fromData

RectSegment.fromData(data: table) -> RectSegment
data
{
    Name : string,

    Wedge : WedgePart,

    P0 : Vector3,
    P1 : Vector3,
    P2 : Vector3,
    P3 : Vector3,
}

fromInstance

RectSegment.fromInstance(instance: Instance) -> RectSegment
instance Children
{
    Wedge : ?WedgePart,

    P0 : Vector3OffsetInstance,
    P1 : Vector3OffsetInstance,
    P2 : Vector3OffsetInstance,
    P3 : Vector3OffsetInstance,
}

RectSegmentBuilder

Constructors

new

RectSegmentBuilder.new() -> RectSegmentBuilder

Methods

WithWedge

RectSegmentBuilder:WithWedge(basePart : BasePart) -> self

WithP0

RectSegmentBuilder:WithP0(offset : Vector3) -> self

WithP1

RectSegmentBuilder:WithP1(offset : Vector3) -> self

WithP2

RectSegmentBuilder:WithP2(offset : Vector3) -> self

WithP3

RectSegmentBuilder:WithP3(offset : Vector3) -> self