-
Notifications
You must be signed in to change notification settings - Fork 738
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
Draw Straight Lines with maptool #4410
Conversation
Brilliant |
Looks great! Documentation update would be nice http://ace3mod.com/wiki/feature/maptools.html |
_pa = _a vectorDiff _p; | ||
_c = _n vectorMultiply ((_pa vectorDotProduct _n) / (_n vectorDotProduct _n)); | ||
_d = _pa vectorDiff _c; | ||
sqrt (_d vectorDotProduct _d); |
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.
private
?
might also want more descriptive variable names
Nice work! Any chance of extending this functionality to be able to draw circles or arcs? |
As far as I know there are no commands to modify the new polyLine marker type; But I don't know anyway to only draw parts of a arc; |
would there be a way to say lock the drawing cursor to the maptool when rotating the map tool to get a fixed radius from the center as the polyline is drawn? |
Close #4153
As you draw lines, if you draw inside of the maptools it will snap your mouse outward to the edge.
As you draw on the edge it records the points on the line.
On finishing drawing, the polyline is converted into a rectangle.
Video has debug on it, the red dots are the corners of the map tools, blue dots are points on the line that we've draw on that are closest to the 2 corners.
https://www.youtube.com/watch?v=hXQbeKrAffg
2 downsides:
setMousePosition
fails if resolution scaling is not 100% (keep cursor centered has same problem)To delete you need to hover in the center of the line, it's somewhat forgiving but it is different than the normal poly lines.
Should be good, tagging wip as I still need to test in mp. Also very useful for clean tic tac toe boards.