Component:ToolSimulator: Difference between revisions

From Resonite Wiki
Automated: update Fields, Categories
reference link
 
(One intermediate revision by the same user not shown)
Line 11: Line 11:
== Fields ==
== Fields ==
{{Table ComponentFields
{{Table ComponentFields
|Tool|ITool|
|Tool|ITool| The tool to simulate the use of.
|SimulatingUser|User|
|SimulatingUser|User| The user that should simulate the tool.
|Primary|Bool|
|Primary|Bool| Whether <code>Tool</code> should be simulated as holding primary.
|Secondary|Bool|
|Secondary|Bool| Whether <code>Tool</code> should be simulated as holding secondary.
|Strength|Float|
|Strength|Float| The primary strength the <code>Tool</code> should be simulated as using.
|Axis|Float2|
|Axis|Float2| The position axis (like trackpad) the <code>Tool</code> should be simulated as using.
}}
}}


== Known Bugs ==
== Known Bugs ==


Currently the primary of the [[Dev Tool]] is not simulated properly and can not move gizmos.
Currently the primary of the [[Dev Tool]] is not simulated properly and can not move gizmos. <ref>https://github.com/Yellow-Dog-Man/Resonite-Issues/issues/3570</ref>


== Usage ==
== Usage ==
Line 31: Line 31:
[[Category:Components:Utility{{#translation:}}|Tool Simulator]]
[[Category:Components:Utility{{#translation:}}|Tool Simulator]]
[[Category:Components{{#translation:}}|Tool Simulator]]
[[Category:Components{{#translation:}}|Tool Simulator]]
[[Category:ComponentStubs]]

Latest revision as of 11:50, 3 August 2025

Component image 
Tool Simulator component as seen in the Scene Inspector

The ToolSimulator Component allows a tool to be used without needing it to be equipped by a User. You can make use of a Tool's primary and secondary actions but not context menu actions.

You need to provide a reference to the tool component that you want to simulate, and also a reference to a simulating user. You can then make use of the Primary, Secondary, Strength and Axis properties.

For example, providing a reference to a Material Tool and then making use of the Primary property will allow you to apply materials to objects in front of the tool.

Fields

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.
Tool ITool The tool to simulate the use of.
SimulatingUser User The user that should simulate the tool.
Primary Bool Whether Tool should be simulated as holding primary.
Secondary Bool Whether Tool should be simulated as holding secondary.
Strength Float The primary strength the Tool should be simulated as using.
Axis Float2 The position axis (like trackpad) the Tool should be simulated as using.

Known Bugs

Currently the primary of the Dev Tool is not simulated properly and can not move gizmos. [1]

Usage

Examples

See Also