Skip to content
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

Using WIND tool with line drawing mode in zoom window doesn't work correctly #899

Closed
JasonS05 opened this issue Jan 23, 2023 · 1 comment

Comments

@JasonS05
Copy link
Contributor

Rather than creating wind in the direction specified by the line tool like usual, it instead determines wind direction by comparing the true position of the place you are making wind (not in the zoom window) and comparing that with the position of your mouse on the screen. This means if you zoom into the lower left corner of the screen (so the zoom window appears in the upper right) then if you use the line tool to make wind in the zoom window, it creates wind in the direction of upper-right unconditionally.

@jacob1
Copy link
Member

jacob1 commented Jan 23, 2023

Interesting bug. The easy fix is just to call c->PointTranslate for drawPoint2 inside OnTick. At that point, the bug is no longer present, and the cursor always lines up with what actually gets drawn.

Right now you can adjust wind tool strength by moving your cursor to positions outside of the sim / tpt window, though. So I made a second function c->PointTranslateNoClamp which only adjusts for zoom window, but not for coordinates outside of the sim. This is probably what I'll end up with but it's late and I want to test some additional edge cases first and maybe adjust the cursor drawing to match what actually gets drawn.

@jacob1 jacob1 closed this as completed in e824e02 Jan 24, 2023
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

No branches or pull requests

2 participants