-
Notifications
You must be signed in to change notification settings - Fork 28
Enable 3d editing #25
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
all-iver
left a comment
There was a problem hiding this 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; |
There was a problem hiding this comment.
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); |
There was a problem hiding this comment.
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; |
There was a problem hiding this comment.
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
shape.mp4