@ No worries, get your PhD finished up, when you get back, I’ll attach an image someone uploaded which explains how LoS and cover work in Xcom: Enemy Unknown. As I suggested earlier, it seems that full cover blocks LoS, but only when the target or attacker are unable to step into an adjacent square to get LoS. So they can shoot around corners, but if you’re in the middle of a 3 tile wall, there is no way for you to shoot through it. Also if the unit is further back, they can’t get shot. https://i.imgur.com/eqnBg.gif seems like the real key difference between xcom and your kit is the ability to step out.
Started the first bit of work on touch controls, in the first image I added a little bit of code to BP_Ability this code checks if touch controls are being used, and if they are, it does the click check that I was talking about. I’ve also disconnected tick in the playercontroller for that mouse hover stuff. This also includes the changes I mentioned earlier. I’ve noticed the following (very odd) behaviour:
-
When Shooting, you can now click the unit once, and it will “hover” on that unit. You can now easily check the hit percentage before firing. However to actually fire, you still need to multi-tap. I have no idea why. By all logic, the next tap should try to run execute but it isn’t, you need to tap 2-3 times before it triggers.
-
Moving still works on a single click. Again, not quite what I’d expect here. Sprint, executes after a single tap. I was expect it to select the tile, then wait for a second tap to actually execute, but it does not. Edit: Nevermind, I just realized that Sprint has an override for server interact, I’ll have to change that one there.
a little more testing and I’ve gotten the following results: I tried rewiring all kinds of different things to see if anything helped this along, the answer was no. I tried adding a similar check in to the sprint ability but it didn’t seem to help, all it did was hover for a split second and then require 2-3 furious taps before it’d move. This may be related to some “jumping” of the location. It’s hard to print location data on an android phone, maybe I’ll have to rig up a debugging UI for this, but I am getting the sense that the location is jumping around. This may be related to the click attempt function in BP_AbilityBase. If the check hovered location fails (which I’ve ticked the touch box for) it returns a click invalid with a location of 0,0,0. Also, I wonder if you tap very fast, if the rest of the function works correctly. If you press touch, it’s supposed to (if not released) run a check for the location and set that, so that it’s available on release. I wonder if there could be a race condition here where if you tap too quickly, if the code doesn’t properly finish checking the location of your tap and may return an old location or 0,0,0 in some cases.