Automated: create new component page |
add info |
||
Line 3: | Line 3: | ||
|Name=Line Segment | |Name=Line Segment | ||
}} | }} | ||
The '''Line Segment''' component is used to create a line between two slots or two local points in space. | |||
== | == Fields == | ||
{{Table ComponentFields | {{Table ComponentFields | ||
|Radius|Float| | |Radius|Float| The radius of the generated line | ||
|Sides|Int| | |Sides|Int| How many sides along the radius circle this cylinder should have. | ||
|Point0|Float3| | |Point0|Float3| Point 1 as a number in local space to place point 1 of the line visual. | ||
|Point1|Float3| | |Point1|Float3| Point 2 as a number in local space to place point 2 of the line visual. | ||
|Anchor0|{{RootFieldType|TransformRelayRef}}|TypeAdv4=true| | |Anchor0|{{RootFieldType|TransformRelayRef}}|TypeAdv4=true| Point 1 as a slot to place point 1 of the line visual. | ||
|Anchor1|{{RootFieldType|TransformRelayRef}}|TypeAdv5=true| | |Anchor1|{{RootFieldType|TransformRelayRef}}|TypeAdv5=true| Point 2 as a slot to place point 2 of the line visual. | ||
|_cylinder|{{RootFieldType|DriveRef`1|[[Component:CylinderMesh|CylinderMesh]]}}|TypeAdv6=true| | |_cylinder|{{RootFieldType|DriveRef`1|[[Component:CylinderMesh|CylinderMesh]]}}|TypeAdv6=true| The line visual to control. | ||
|_collider|{{RootFieldType|DriveRef`1|[[Component:CylinderCollider|CylinderCollider]]}}|TypeAdv7=true| | |_collider|{{RootFieldType|DriveRef`1|[[Component:CylinderCollider|CylinderCollider]]}}|TypeAdv7=true| The collider for the line visual. | ||
|_offset|{{RootFieldType|FieldDrive`1|[[Type:Float3|Float3]]}}|TypeAdv8=true| | |_offset|{{RootFieldType|FieldDrive`1|[[Type:Float3|Float3]]}}|TypeAdv8=true| The field to drive for the position of the visual + collider slot. | ||
|_rotation|{{RootFieldType|FieldDrive`1|[[Type:FloatQ|FloatQ]]}}|TypeAdv9=true| | |_rotation|{{RootFieldType|FieldDrive`1|[[Type:FloatQ|FloatQ]]}}|TypeAdv9=true| The field to drive for the rotation of the visual + collider slot. | ||
|_visualScale|{{RootFieldType|FieldDrive`1|[[Type:Float3|Float3]]}}|TypeAdv10=true| | |_visualScale|{{RootFieldType|FieldDrive`1|[[Type:Float3|Float3]]}}|TypeAdv10=true| The field to drive for the scale of the visual + collider slot. | ||
}} | }} | ||
== | == Usage == | ||
Can be used to make a line that connects two points. To use an abitrary point, one can use [[ProtoFlux]] or [[Spatial Variables]] in order to dynamically set <code>Anchor0</code> and/or <code>Anchor1</code> using code or proximity. | |||
== Examples == | == Examples == | ||
{{stub}} | |||
== See Also == | == See Also == | ||
Line 28: | Line 30: | ||
[[Category:Components:Uncategorized{{#translation:}}|Line Segment]] | [[Category:Components:Uncategorized{{#translation:}}|Line Segment]] | ||
[[Category:Components{{#translation:}}|Line Segment]] | [[Category:Components{{#translation:}}|Line Segment]] | ||
Latest revision as of 17:17, 1 June 2025
Component image 
Line Segment component as seen in the Scene Inspector

The Line Segment component is used to create a line between two slots or two local points in space.
Fields
Name | Type | Description |
---|---|---|
persistent
|
Bool | Determines whether or not this item will be saved to the server. |
UpdateOrder
|
Int | Controls the order in which this component is updated. |
Enabled
|
Bool | Controls whether or not this component is enabled. Some components stop their functionality when this field is disabled, but some don't. |
Radius
|
Float | The radius of the generated line |
Sides
|
Int | How many sides along the radius circle this cylinder should have. |
Point0
|
Float3 | Point 1 as a number in local space to place point 1 of the line visual. |
Point1
|
Float3 | Point 2 as a number in local space to place point 2 of the line visual. |
Anchor0
|
direct TransformRelayRef | Point 1 as a slot to place point 1 of the line visual. |
Anchor1
|
direct TransformRelayRef | Point 2 as a slot to place point 2 of the line visual. |
_cylinder
|
reference drive of CylinderMesh | The line visual to control. |
_collider
|
reference drive of CylinderCollider | The collider for the line visual. |
_offset
|
field drive of Float3 | The field to drive for the position of the visual + collider slot. |
_rotation
|
field drive of FloatQ | The field to drive for the rotation of the visual + collider slot. |
_visualScale
|
field drive of Float3 | The field to drive for the scale of the visual + collider slot. |
Usage
Can be used to make a line that connects two points. To use an abitrary point, one can use ProtoFlux or Spatial Variables in order to dynamically set Anchor0
and/or Anchor1
using code or proximity.
Examples
This article or section is a Stub. You can help the Resonite Wiki by expanding it.