Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
Added drag direction mouse interaction for set the approach direction for airstrike and parabombs #15226
This PR will update the WorldInteractionControllerWidget with support for drag a direction that could be used for setting the direction for AirStrike, Parabombs and similar stuff. It also updated the AirStrike Power to use this direction.
Open discussion around #14181
I'm really excited by the idea of this, thanks for taking it on after such a long time!
Unfortunately I don't have time to do any serious reviewing for the next couple of weeks, so I can't leave any detailed comments. At a broad level, I have one big request about how the input for this should work, which I was absolutely convinced that I had written up in that issue a long time ago, but it must have been somewhere else (the forum or IRC): Instead of having a rendered line (which IMO isn't very intuitive or polished) we should keep the standard cursor and have the default click action keep a random direction. If the user drags outside of a defined dead zone we should switch to the scroll arrow cursors and draw the default targeting cursor manually at the target location. This then lets the player select one of 8 directions for the plane.
If you're worried about aesthetics, a simple function to call the distance from the closest border/border point, to the target location, aligned with the direct the player chooses, the bombers could then fly in from the border, in the direction of choice, as close as possible to the target location, dependent on the alignment.
Example Picture: https://imgur.com/a/Yhkt4L7
The problem with a single click drop, is that the direction cannot be chosen as desired.
The red lines show the desired target location and direction, towards the x mark.
The green lines show the path that will be taken.
As you can see, if the player chooses a direction that would cause the planes to fly in from the farthest point in that alignment, the planes code would simply switch/reverse the path taken, so they still come in from the closest point, while following the chosen, desired alignment.
The only problem I see, is getting past enemy air defenses way too easily, but at the same time, it's a support power, which should help change the tide of battle a bit.
Indeed. The implementation I have in mind is to change the cursor to an invisible placeholder on mousedown, and draw the cursor manually at the mousedown location using
As I said before the code is still wip :) but I was looking for some feedback on the idea of moving some of the handlemouseinput to the ordergenerators, as you can see in the selectdirection ordergenerator for the airstrike. If we want to take this path then I will need to update all the ordergenerators with this, prolly doing a base class.…
On Sat, Mar 9, 2019, 13:27 Paul Chote ***@***.***> wrote: I'm confused about what to comment on. Most of the code seems to be missing! — You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub <#15226 (comment)>, or mute the thread <https://github.com/notifications/unsubscribe-auth/ASSPmNIm4WNEbyOksII7hm90Vp6L-oH3ks5vU6i_gaJpZM4UhvlS> .
2 times, most recently
Mar 14, 2019
I wonder if it's the changes in mods/ra/chrome/ingame-player.yaml that are causing it.…
On Sun, Mar 31, 2019, 13:49 Paul Chote ***@***.***> wrote: Regression: the "Select Target" audio notification no longer plays in at least RA. Otherwise LGTM. — You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub <#15226 (comment)>, or mute the thread <https://github.com/notifications/unsubscribe-auth/ASSPmDL6t427PmnWoiQ_54a_NTz8vUxuks5vcKC-gaJpZM4UhvlS> .