Hand-written by Joseph San Nicolas, Roblox Developer
Path2DControlPoint
Constructors
| Name | Description |
| new() | Returns an empty Path2DControlPoint. |
| new(Position: UDim2) | Returns a Path2DControlPoint with the position set. This constructor sets the left and right tangents to default UDim2 values. |
| new(Position: UDim2, Left Tangent: UDim2, Right Tangent: UDim2) | Returns a Path2DControlPoint with the position, left tangent, and right tangent all set. |
Code Snippet
local path = Instance.new("Path2D")
path.Parent = script.Parent
path:SetControlPoints({
Path2DControlPoint.new(UDim2.fromScale(0, 0)),
Path2DControlPoint.new(UDim2.fromScale(0.5, 1), UDim2.fromScale(-0.1, 0), UDim2.fromScale(0.1, 0)),
Path2DControlPoint.new(UDim2.fromScale(1, 0)),
})
Properties
| Name | Type | Description |
| Position | UDim2 | The position of the Path2DControlPoint relative to the path's container. |
| LeftTangent | UDim2 | The left tangent of the Path2DControlPoint. |
| RightTangent | UDim2 | The right tangent of the Path2DControlPoint. |