AdamsLair / duality

a 2D Game Development Framework
https://adamslair.github.io/duality
MIT License
1.41k stars 287 forks source link

Rigidbody Editor Mirror Line #682

Open ChristianGreiner opened 6 years ago

ChristianGreiner commented 6 years ago

Summary

Creating a perfect symmetrical rigidbody poly shape can be quite hard. It would be very useful to enable a mirror line on both axes so the shape vertices will be added on the opposite site automatically.

Analysis

What do you think?

ilexp commented 6 years ago

Mirroring could be a general RigidBody editor feature allowing features like:

From the user side, I'd imagine some sort of a "mirror mode" toggle button with a point and a line sub-button, that, when clicked, enables a tool to specify that line or point. While active, all operations are mirrored accordingly. Another click to that button disables the mode again. No meta-information about mirroring is stored persistently in the body and users can use different lines and points as needed while working on the shape - so using any of the mirror functionality does not require the whole shape to be mirrored that way, it just helps non-destructively with the parts being worked on.

Based on the feature list, this issue would be pretty heavy, both design and implementation wise. Maybe we could start with something smaller, a simple first approach, which could be extended in the outlined direction at some point. Could be as simple as a single-click "mirror X" / "mirror Y" button that does a mirrored clone of what's there, which might still provide a good workflow benefit.