Document toolboxDocument toolbox

2022.1.1148.0 Snap Controller



Overview

The SnapController manages all snappable objects within the scene and allows the user to snap object together. The appropriate components for the connection are automatically created upon snapping.


Where to find

There is no need to manually add a SnapController to the scene. Upon adding a component to your scene (a Conveyor for example), the SnapController is automatically created and the new component is parented underneath it.


Feature layout

The image below shows the complete feature layout of the SnapController inspector.

Default inspector of a SnapController where two Conveyors are snapped together

Fields

 

Splines In Scene

A list of all Splines in the scene that are currently indexed within the SnapController.

Snapping Is On

Whether Snapping is active in the Scene View

Max Snap Distance

The maximum distance of a Snap in units (m)

Snap Only Endpoints

When enabled, only the first and last Control Point of a Spline are snappable. If not enabled, all Control Points are snappable.

Junctions In Scene

A list of all Junctions in the scene that are currently indexed within the SnapController.

Show When Not Selected

Whether to draw all indexed Splines when not selected.

Show Normal Line

Whether to draw all indexed Splines' normal lines when not selected.

Show Forward Line

Whether to draw all indexed Splines' forward lines when not selected.

Show Point Names

Whether to draw all indexed Splines' Control Points' labels when not selected.

Show Junction Labels

Whether to draw all indexed Junctions' labels.

Index Splines

Re-index all Splines in the scene.

Index Junctions

Re-index all Junctions in the scene.

Toggle Junction visibility

Whether to draw all indexed Junctions.


How to use

  1. Add a component to the scene that required the SnapController. For example, a Conveyor.

  2. The SnapController is now automatically created and added to the Scene.

  3. Add another Conveyor to the Scene. Since the SnapController is already present, a new one is not created.

  4. Make sure Snapping Is On is enabled within the SnapController. This can either be done in the inspector of the component, or by clicking the magnet icon in the top left corner of the Scene View. The hotkey for this is “S”.

  5. Move either Conveyor towards the other within the set Max Snap Distance, and you will notice a tether starts being drawn between the two Conveyors.

  6. Release the mouse button to complete the Snap. In this case the two Conveyors are snapped together and a Junction is added in between them.


Prespective Documentation