Layer:setCurve
EditSets the curve of the layer. Curving a layer renders it on a piece of a cylinder instead of a plane. The radius of the cylinder is 1 / curve
meters, so increasing the curve decreases the radius of the cylinder.
Layer:setCurve(curve)
Arguments
Name | Type | Default | Description |
curve | number | 0 | The curve of the layer. Negative values or zero means no curve. |
Returns
Nothing
Notes
When a layer is created, its curve is zero.
Not every headset system supports curved layers. See the layerCurve
property of lovr.headset.getFeatures
to check for support. If curved layers are not supported, this function will do nothing.
No matter what the curve is, the center of the layer texture will always get rendered at the layer's pose.
The largest possible curve is 2 * math.pi / width
, where width
is the width of the layer in meters. This would cause the cylinder to fully wrap around.