Method ManipulatorSnap
ManipulatorSnap(Transform, Transform[], ref Vector3, ref Quaternion, Vector3, AxisFlags, PivotMode)
Perform manipulator snapping: Translate a position vector using deltas while also respecting snapping
Declaration
bool ManipulatorSnap(Transform rayOrigin, Transform[] transforms, ref Vector3 position, ref Quaternion rotation, Vector3 delta, AxisFlags constraints, PivotMode pivotMode)
Parameters
Type | Name | Description |
---|---|---|
Transform | rayOrigin | The ray doing the translating |
Transform[] | transforms | The transforms being translated (used to determine bounds; Transforms do not get modified) |
Vector3 | position | The position being modified by delta. This will be set with a snapped position if possible |
Quaternion | rotation | The rotation to be modified if rotation snapping is enabled |
Vector3 | delta | The position delta to apply |
AxisFlags | constraints | The axis constraints |
PivotMode | pivotMode | The current pivot mode |
Returns
Type | Description |
---|---|
bool | Whether the position was set to a snapped position |