toebeann / SnapBuilder

Snap-to-Grid in Subnautica!
https://www.nexusmods.com/subnautica/mods/427
GNU Lesser General Public License v3.0
5 stars 1 forks source link

Fix cyclops forward rotation #46

Closed toebeann closed 3 years ago

toebeann commented 3 years ago

Improved OptimalTransform algorithm, takes into account the difference in the angle between the parent and the original and treats them as good enough if the parent is at a 0,45,90,135,180 etc. degree rotation of the original before choosing the parent transform.

This eliminates a bug where in some instances, such as inside the cyclops, or in the Habitat Platform mod, we are choosing the parent for snapping/rotation when we should not, as the parent results in a poor alignment.