-
Notifications
You must be signed in to change notification settings - Fork 6
Description
Some thinking into symmetry, which will be implemented in the coming commits:
Types of symmetry
- Radial around piece: Pieces attached to the surface of a piece will get duplicated around the central axis of said piece, as long as the user has chosen this symmetry mode.
- Radial around axis: Once this symmetry mode is chosen, the user must input an axis (think of how this would work in the GUI), which is used as the central axis for symmetry
- Planar around piece: Same as before, but with planar symmetry around a given plane selected by the user from a list of axes specified by the piece. Only usable on certain pieces.
- Planar around axis: Same as before, but the user specifies the axis around the piece (think how to implement the GUI)
- Attachment list: This is not a true symmetry, but instead the user selects a list of attachment points and pieces are duplicated across them
- Cluster: The user chooses a plane, radius and number of copies, and a "engine cluster" is built from the given piece.
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.