Open tatjam opened 1 year ago
Symmetry mode will be implemented in lua for user customization, although "vanilla" ones are going to be fairly exhaustive of all useful modes.
Nested symmetry should be implemented by duplicating the symmetry groups. As this is a fairly generic thing, it would be wise to implement some kind of API that allows you to obtain a list of points where an action is needed in symmetry. This would also help implement auto-wiring and auto-plumbing
EDIT: Duplication meaning the application of the symmetry group in the different root pieces, with lua handling the transformation in space?
Some thinking into symmetry, which will be implemented in the coming commits:
Types of symmetry
Implementation
Each symmetry mode requires some custom GUI, both as widgets on the editor panel, and as 3D gizmos on the editor. Symmetry is not directly stored in the vehicle, but in VehicleMeta. Finally, wiring and plumbing will properly be duplicated if the user chooses so.
GUI
Symmetry will work by first choosing a symmetry mode, and then clicking an unattached root piece, which will make the symmetry apply to said piece and all children. Unattached root pieces will be highlighted during this editor mode.
Once a piece is affected by symmetry, any modification to it or its children will be mirrored, but if the piece itself is detached the symmetry will break, and all cloned pieces will disappear. Finally, the user may delete a symmetry group, but keep the symmetric pieces, via a button on the GUI.
Symmetry will be handled in the attach editor mode.