Commit 7f0ccec
committed
Copy/paste, deep-clone duplicate, floor-align paste, camera-facing gizmo
Duplicate (Ctrl+D) now uses Bevy's EntityWorldMut::clone_and_spawn so
every component transfers (mesh, material, children, etc.). Previously
only Name + Transform were copied, so the duplicate appeared in the
hierarchy with no visible mesh.
Copy / Paste:
- EditorAction::Copy (Ctrl+C) and EditorAction::Paste (Ctrl+V), both
rebindable in Settings -> Shortcuts under Edit.
- Copy snapshots the current selection into an EditorClipboard
resource. Paste deep-clones each entity, skipping ones that were
despawned between copy and paste.
- Cursor-aware paste: if the cursor is over the viewport, the pasted
group's XZ centroid lands on the ground-plane hit and the group's
lowest mesh AABB bottom sits at y=0 (so a Cuboid goes from 0..height
instead of half below the floor). Over a panel, paste uses the
sources' original positions.
Camera-facing move gizmo:
- Each of X / Y / Z arrows flips per-axis so the handle always points
toward the viewing camera. Computed from cam-pivot direction; frozen
while a drag is in progress so axes don't flip out from under the
user mid-drag.
- Applied via negative components of the gizmo root's scale; drag and
hover detection use the signed axis so motion matches the visual.
- GizmoMaterial now disables backface culling so the mirrored cone
heads / scale cubes render correctly under inverted winding.
Plane handles (XY / XZ / YZ) keep their original quadrant for v1.1 parent 267bfa4 commit 7f0ccec
2 files changed
Lines changed: 268 additions & 36 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
42 | 42 | | |
43 | 43 | | |
44 | 44 | | |
| 45 | + | |
| 46 | + | |
45 | 47 | | |
46 | 48 | | |
47 | 49 | | |
| |||
96 | 98 | | |
97 | 99 | | |
98 | 100 | | |
| 101 | + | |
| 102 | + | |
99 | 103 | | |
100 | 104 | | |
101 | 105 | | |
| |||
139 | 143 | | |
140 | 144 | | |
141 | 145 | | |
142 | | - | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
143 | 151 | | |
144 | 152 | | |
145 | 153 | | |
| |||
189 | 197 | | |
190 | 198 | | |
191 | 199 | | |
| 200 | + | |
| 201 | + | |
192 | 202 | | |
193 | 203 | | |
194 | 204 | | |
| |||
322 | 332 | | |
323 | 333 | | |
324 | 334 | | |
| 335 | + | |
| 336 | + | |
325 | 337 | | |
326 | 338 | | |
327 | 339 | | |
| |||
0 commit comments