(One intermediate revision by one other user not shown)
Line 3:
Line 3:
|Name=Interaction Laser
|Name=Interaction Laser
}}
}}
{{stub}}
The '''InteractionLaser''' component is part of the user to world interaction interfacing. This component is entirely regenerated separate from the avatar per respawn, making it un-reference-able.
== Usage ==
== Fields ==
{{Table ComponentFields
{{Table ComponentFields
|SmoothSpeed|Float|
|SmoothSpeed|Float| How much to smooth laser movement for this laser.
|SmoothModulateStartAngle|Float|
|SmoothModulateStartAngle|Float| Angle at which the laser smoothing speed will start modulating to catch up to your movements. Increasing this value will require larger movements for the laser to start catching up.
|SmoothModulateEndAngle|Float|
|SmoothModulateEndAngle|Float| Related to the modulate start angle, this indicates when the modulation will reach maximum speed. By changing the start and end angles, you can control how responsive the laser is the more you move your hand.
|SmoothModulateExp|Float|
|SmoothModulateExp|Float| Controls the response curve of the laser modulation between the start and end angles. You can use this to either make the laser respond more sluggishly at first or to start responding quickly and then tapering off.
|SmoothModulateMultiplier|Float|
|SmoothModulateMultiplier|Float| The laser smoothing speed will be multiplied by this value once you have reached the modulate end angle. Increasing this value will make the laser catch up quicker once you move your hand far enough. Lowering the value will make it take longer to catch up.
|StickThreshold|Float|
|StickThreshold|Float| Controls how much the laser will stick to interactive items. Larger values will make it stick more. Setting this to zero will stop the stickiness completely.
|ShowInDesktop|Bool|
|ShowInDesktop|Bool| When on, the laser visual will be rendered to you fully when in first person view in desktop mode.
|MaxTouchPenetrationDistance|Float|
|MaxTouchPenetrationDistance|Float| Determined by the [[Component:RelayTouchSource|RelayTouchSource]]'s <code>MaxTouchPenetrationDistance</code>.
|StickPointSpace|Slot|
|StickPointSpace|Slot| The slot the laser is sticking to.
|StickPointPosition|Float3|
|StickPointPosition|Float3| The position the laser is sticking to.
|_handler|'''[[Component:InteractionHandler|InteractionHandler]]'''|TypeAdv10=true| The interaction handler used to handle behavior for this component.
|_lastInteractionTarget|{{RootFieldType|AutoSyncRef`1|[[Type:IInteractionTarget|IInteractionTarget]]}}|TypeAdv12=true| The last interactable element this laser hit.
|_lastInteractionModifier|{{RootFieldType|AutoSyncRef`1|[[Type:ILaserInteractionModifier|ILaserInteractionModifier]]}}|TypeAdv13=true| The last interaction modifier this laser was affected by.
|_hitColor|ColorX|
|_hitColor|ColorX| The color the laser should have when it hits something.
|_laserTextureSpeed|Float|
|_laserTextureSpeed|Float| The speed the texture of the laser moves for effects like dotted lines.
|_touchSource|'''[[Component:RelayTouchSource|RelayTouchSource]]'''|TypeAdv16=true| The touch source associated with this laser for touching things physically
|_laserRenderQueue|{{RootFieldType|FieldDrive`1|[[Type:Int|Int]]}}|TypeAdv21=true| The render queue field of the material being used for this laser's visual.
|_laserFrontTextureOffset|{{RootFieldType|FieldDrive`1|[[Type:Float2|Float2]]}}|TypeAdv22=true| The front texture field of the material being used for this laser's visual.
|_laserBehindTextureOffset|{{RootFieldType|FieldDrive`1|[[Type:Float2|Float2]]}}|TypeAdv23=true| The behind texture field of the material being used for this laser's visual.
|_directPoint|{{RootFieldType|FieldDrive`1|[[Type:Float3|Float3]]}}|TypeAdv24=true| The field of the direct point of the bent tube mesh being used for this laser's visual.
|_actualPoint|{{RootFieldType|FieldDrive`1|[[Type:Float3|Float3]]}}|TypeAdv25=true| The field of the actual point of the bent tube mesh being used for this laser's visual.
|_startColor|{{RootFieldType|FieldDrive`1|[[Type:ColorX|ColorX]]}}|TypeAdv26=true| The field of the start color of the bent tube mesh being used for this laser's visual.
|_endColor|{{RootFieldType|FieldDrive`1|[[Type:ColorX|ColorX]]}}|TypeAdv27=true| The field of the end color of the bent tube mesh being used for this laser's visual.
|_pointSlot|Slot|
|_pointSlot|Slot| The field of the point slot of the bent tube mesh being used for this laser's visual.
|_pointSlotPos|{{RootFieldType|FieldDrive`1|[[Type:Float3|Float3]]}}|TypeAdv29=true| The field of the position of the point slot being used for this laser's visual.
|_cursorFrontTint|{{RootFieldType|FieldDrive`1|[[Type:ColorX|ColorX]]}}|TypeAdv36=true| The field used to control the tint of the cursor when it is directly visible by the camera.
|_cursorBehindTint|{{RootFieldType|FieldDrive`1|[[Type:ColorX|ColorX]]}}|TypeAdv37=true| The field used to control the tint of the cursor when it is not directly visible by the camera.
|_cursorRenderQueue|{{RootFieldType|FieldDrive`1|[[Type:Int|Int]]}}|TypeAdv38=true| The render queue field of the material being used for this laser's cursor visual.
|_cursorOrientation|{{RootFieldType|FieldDrive`1|[[Type:FloatQ|FloatQ]]}}|TypeAdv39=true| The field used to control the orientation for this laser's cursor visual.
|_cursorTint|ColorX|
|_cursorTint|ColorX| The field used to control the color for this laser's cursor visual.
|_directCursorVisualsVisible|Bool|
|_directCursorVisualsVisible|Bool| Whether the cursor's direct view visuals are visible or not.
|_directCursorOrientation|{{RootFieldType|FieldDrive`1|[[Type:FloatQ|FloatQ]]}}|TypeAdv46=true| The field to drive with the direct cursor's orientation.
|_directLineTarget|{{RootFieldType|FieldDrive`1|[[Type:Float3|Float3]]}}|TypeAdv47=true| The field to drive with the direct cursor's direct line position.
|GetTipPosition:[[Type:Func`2|Func`2]]<[[Component:RelayTouchSource|RelayTouchSource]], [[Type:Float3|Float3]]>|[[Type:Func`2|Func`2]]<[[Component:RelayTouchSource|RelayTouchSource]], [[Type:Float3|Float3]]>|true| Gets the tip position of this laser, keeping in mind the settings and values of the inputted [[Component:RelayTouchSource|RelayTouchSource]].
|GetTipDirection:[[Type:Func`2|Func`2]]<[[Component:RelayTouchSource|RelayTouchSource]], [[Type:Float3|Float3]]>|[[Type:Func`2|Func`2]]<[[Component:RelayTouchSource|RelayTouchSource]], [[Type:Float3|Float3]]>|true| Gets the tip direction of this laser, keeping in mind the settings and values of the inputted [[Component:RelayTouchSource|RelayTouchSource]].
|GetTouchType:[[Type:Func`2|Func`2]]<[[Component:RelayTouchSource|RelayTouchSource]], [[Type:TouchType|TouchType]]>|[[Type:Func`2|Func`2]]<[[Component:RelayTouchSource|RelayTouchSource]], [[Type:TouchType|TouchType]]>|true| Gets the touch type of this laser, keeping in mind the settings and values of the inputted [[Component:RelayTouchSource|RelayTouchSource]].
|GetTouchable:[[Type:TouchableGetter|TouchableGetter]]|[[Type:TouchableGetter|TouchableGetter]]|true| Gets the touching status of an inputted [[Component:RelayTouchSource|RelayTouchSource]] and what it has touched if any.
}}
}}
== Behavior ==
== Usage ==
Not to be interacted with by the user. handles internal behavior.
The InteractionLaser component is part of the user to world interaction interfacing. This component is entirely regenerated separate from the avatar per respawn, making it un-reference-able.
Angle at which the laser smoothing speed will start modulating to catch up to your movements. Increasing this value will require larger movements for the laser to start catching up.
Related to the modulate start angle, this indicates when the modulation will reach maximum speed. By changing the start and end angles, you can control how responsive the laser is the more you move your hand.
Controls the response curve of the laser modulation between the start and end angles. You can use this to either make the laser respond more sluggishly at first or to start responding quickly and then tapering off.
The laser smoothing speed will be multiplied by this value once you have reached the modulate end angle. Increasing this value will make the laser catch up quicker once you move your hand far enough. Lowering the value will make it take longer to catch up.
Controls how much the laser will stick to interactive items. Larger values will make it stick more. Setting this to zero will stop the stickiness completely.