Skip to content

Conversation

@aarcangeli
Copy link

@aarcangeli aarcangeli commented Aug 20, 2023

  1. The user can now edit paths and polygons without activating 2d mode
shape.mp4
  1. edit mode is not stopped on alt+click and other view gestures

Copy link
Owner

@all-iver all-iver left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is really cool, thanks for your work! I played around a bit and it seems to work well, I just have a couple quick edits if you get a chance, but then it seems fine to merge.

void DoMovePathPoint(List<PathSegment> segments, int i, Vector2 newPos) {
void DoMovePathPoint(List<PathSegment> segments, int i, Vector3 newPos) {
PathSegment seg = segments[i / 3];
Vector2 offset = seg.p1 - seg.midpoint;
Copy link
Owner

@all-iver all-iver Aug 23, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm seeing curves snapping to straight lines when editing in 3d, if I drag a path point. I think changing this Vector2 offset to a Vector3 fixes it...

size.x = Vector3.Distance(topLeft, topRight);
size.y = Vector3.Distance(topLeft, bottomLeft);
size.x = Vector2.Distance(topLeft, topRight);
size.y = Vector2.Distance(topLeft, bottomLeft);
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

IIRC I changed this to Vector3 at some point but now I can't remember if it was fixing an actual problem or just a random change...I think it would be better to leave it the way it was just in case, since I don't think this is needed by your PR

size.x = Vector3.Distance(topLeft, topRight) / scaleFactor;
size.y = Vector3.Distance(topLeft, bottomLeft) / scaleFactor;
size.x = Vector2.Distance(topLeft, topRight) / scaleFactor;
size.y = Vector2.Distance(topLeft, bottomLeft) / scaleFactor;
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same as the above, I think if this isn't needed by the PR it might as well stay as Vector3 just in case it was solving some edge case

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants