mirror of
https://github.com/MaSzyna-EU07/maszyna.git
synced 2026-11-01 08:02:10 +01:00
feat(editor): an end of a track dragged, and an end of a straight dragged by its handle, goes onto the ground at the height of the ballast, as a point laid; with Shift held it keeps its height
Selftest trackends: the ends of a track against the ground under them.
This commit is contained in:
@@ -604,7 +604,8 @@ void editor_mode::render_straight_gizmo()
|
||||
|
||||
glm::dvec3 const anchors[] = {line.start, line.end, (line.start + line.end) * 0.5};
|
||||
glm::dvec3 handled{anchors[state.handle]};
|
||||
bool const held{handle_drag_step(handled)};
|
||||
// the ends go onto the ground, the middle moves the line in plan alone
|
||||
bool const held{handle_drag_step(handled, state.handle == 2 ? nullptr : line.tracks.front())};
|
||||
if (false == held && false == state.dragging)
|
||||
return;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user