Custom Pivots, Attractors & Snap
This page is being update, its not completed...

You can now set custom pivot points for your objects, allowing for precise modular placement. To add a custom pivot:


Adding Custom Pivots
Select the object you want to make a custom pivot, click add component, and select "PrefabBrushPivot". It is recommended to use any object in your prefab root with a mesh renderer

You can add it to your objects root, or to any children.



Pivot Component

0 - Root Object: The object this pivot will control.
1 - Show Gizmos: Allows you to draw handlers to move your pivot over the object easily
2- Pivot name (Optional): A pivot name to help you identify it. You can leave it blank.
3- Pivot Offset: The local offset of this pivot.
4- Snap To Closest Vertex: If your object has a MeshRenderer component, the pivot offset will align with the closest vertex found.
5- Select Attractor: A dropdown with all the found attractors' names in your scene. You can add an empty attractor and modify it later.
6- Add attractor button: A button to add the value from the dropdown.
7- Close Attractors sections: Find attractors that your pivot is in whitin range.
8- Snap Button: Snaps your pivot to the attractor
Changing Between Pivots
You can have as many custom pivots as you want. To change between them, just use the next and previous buttons.
You can also use the keyboard shortcuts while placing your objects. Please ensure you are using Prefab_Brush_Pivot_Component as the pivot mode.
Keyboard Shortcuts (Default):
Alpha 1-> Previous Pivot
Alpha 3 -> Next Pivot

Attractors
Attractors are a new component designed to streamline the use of modular assets, such as walls, fences, and ground pieces. Here's how they work:
Attractors are components that attract custom pivots on your objects.
Each attractor has a unique name.
Custom pivots have an array called AttractedBy.
If the attractor’s name is in the pivot’s AttractedBy array, the pivot aligns with the attractor’s position when using the Prefab Brush.
Adding Attractors
Note: Attractors only interact with pivots.

Pro Tip:
When creating attractors and pivots, use the V key to align the object’s transform with any mesh vertex for accurate positioning.
If you are using the Mesh Raycast mode, remember to check the "Add Painted to Raycast Mesh" toggle, as in the image below.

Attention: Pivots and attractors currently only function in Precision Mode. Support for using pivots in Multiple Mode is under development and will be available in a future update.
Last updated