Component:Snapper: Difference between revisions

From Resonite Wiki
Automated: update Fields, Categories
m basic description to go alongside the behavior section instead of empty introduction header
 
Line 4: Line 4:
|Name=Snapper
|Name=Snapper
}}
}}
 
The Snapper component allows a slot to parent to [[Component:SnapTarget|Snap Target]] slots.
== Introduction ==
{{stub}}


== Usage ==
== Usage ==

Latest revision as of 01:31, 20 April 2024

This article or section is a Stub. You can help the Resonite Wiki by expanding it.


Component image 
Snapper component as seen in the Scene Inspector

The Snapper component allows a slot to parent to Snap Target slots.

Usage

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.
UseBoundingBoxCenter Bool This article or section is a Stub. You can help the Resonite Wiki by expanding it.
SnapCheckRadius Float This article or section is a Stub. You can help the Resonite Wiki by expanding it.
CheckStaticColliders Bool Allows the Snapper to look for colliders that are set to Static rather then Trigger.
SnapTargetWhitelist list of SnapTarget List of Snap Targets that the slot can attach to
Keywords direct SyncFieldList`1<String> List of keywords to match against a corresponding Snap Targets. Can have multiple keywords to snap to multiple Snap Targets

Behavior

Allows the slot in which this component resides in to snap to a Snap Target in another slot. The SnapTargetWhitelist allows you to specify a list of SnapTargets that this component will link to in case you want to limit its snapability. The keywords list allows you to provide a list of words which the Snap Target can use to filter for specific types of snappers.

It is important to have this in a slot shared with a Grabbable component in the root link of the object you wish to snap. Snapped components will become children of the snap target.

Examples

This article or section is a Stub. You can help the Resonite Wiki by expanding it.