-
Notifications
You must be signed in to change notification settings - Fork 23
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
Implement click on vehicle to reverse direction #13
Comments
I guess we'll need to keep in mind that this needs to be anchored to the vehicle... If it's anchored to the center of the main screen, and the vehicle is moved off to the side, the click location and the vehicle will not line up. Same with the reverse arrow in #12 |
I think I accidentally found the solution. The code the implements drag to pan calculates how far from the tractor the click is. So if we translate this to javascript, and then look for 0,0, that will be on the tractor. I'll create another issue to translate the click to field coordinates routines to javascript. |
Also the position of the reverse arrow can be calculated by replicating all the OpenGL coordinate transformations in Javascript. Fortunately qml provides a matrix4x4 type for this purpose. I note that the current AOG code to draw the arrow does not take panning into account. It always puts it just left of the center of the screen (it does not use field coordinates or anything like that). |
Both added to qml now. |
Implement click on vehicle to reverse direction. Possibly can do it directly from QML using matrix4x4 transformations.
The text was updated successfully, but these errors were encountered: