(One intermediate revision by one other user not shown)
Line 2:
Line 2:
<translate>
<translate>
<!--T:1-->
<!--T:1-->
{{stub}}
{{Infobox Component
{{Infobox Component
|Image=KnobControlComponent.png
|Image=KnobControlComponent.png
Line 13:
Line 12:
== Fields ==
== Fields ==
{{Table ComponentFields
{{Table ComponentFields
|Target|IField`1|TypeString0=IField<float>|A field to set with the knob's value.
|Target|'''[[Type:IField`1|IField`1]]<[[Type:Float|Float]]>'''|TypeAdv0=true|A field to set with the knob's value.
|Callback|WorldDelegate|A delegate that is called with the knob's value change.
|Callback|{{RootFieldType|SyncDelegate`1|[[Type:Action`1|Action`1]]<[[Type:Float|Float]]>}}|TypeAdv1=true|A delegate that is called with the knob's value change.
|RotationAxis|Float3|The axis around which to measure the slot's local rotation.
|RotationAxis|Float3|The axis around which to measure the slot's local rotation.
|Rate|Float|The proportional effect of the knob, in values per full (360-degree) rotation.
|Rate|Float|The proportional effect of the knob, in values per full (360-degree) rotation.
(internal, read-only) The user who last rotated the slot.
Usage
As the local rotation of this component's slot changes, the knob's value is updated according to how much it has rotated about the RotationAxis. The amount the value changes is determined by the change in rotation (measured in fractions of a full rotation, so for example a change of one degree would be 1/360), multiplied by the Rate.
Note that the value field is not driven. This means it is synced to all users, and can be written to at any time.
This component is most useful when coupled with a Joint to restrict the slot's rotation to be only around the rotation axis.