That’s okay, I’ll keep feeding you with data, and hopefully something will click for you.
I went ahead and set up a debug text box on my UI to display the coordinates on android. I’ve attached the graph, but right before the branch where do the check for touch controls, I’m casting to the UI and setting the value of the box to the clicked index, and I’m again getting very odd unexpected behaviour. I’ve attached a picture of the little bit of messy debugging code I’ve inserted, but when actually trying it on my phone it’s very strange.
This code will only run when shooting (not on movement since it has its’ own override)
When I click a unit, and it “hovers” to show me the percentage… the text box doesn’t display anything. This makes no sense to me. I assumed that code was running. Prior to inserting that that check to see if touch controls were being used and telling it to branch on the clicked index, I couldn’t do this. If I tried to “hover” a unit, I couldn’t display the to hit chance. After inserting this code, I could now hover, and then (with a couple taps) make it fire at that unit. But when I hover a unit, the clicked index is not displayed. So I’m now mystified as to why the hover works when I click on a unit once.
After a little more testing if “long press” the unit sometimes the clicked index will update in the UI, but it isn’t consistent. Regardless of it updating, further clicking on the unit will make it fire and it will generally display the clicked index on firing.
I’ve now confirmed something strange going on by connecting the update to another spot.
I’ve now connected the text display update in the same function but immediately after the check to see if the tile is valid. At this point, I’m getting strange returns on the clicked index. if I long press a unit, and it selects them, I get their tile, in this case it’s tile, 1,004,010. If I quickly tap other squares, I get strange results. It sometimes changes to 8,002 which I feel shouldn’t happen because I have multiheight on and it should always return a “level” or something right? That’s what that first “1” is in the correct index, isn’t it?
If I tap random squares (some where units aren’t) it sometimes returns a correct looking index, like x,xxx,xxx but sometimes it returns a strange index like x,xxx
I just tried taking a shot at a unit. It first returned the clicked index as 1,004,010 but when I clicked it again, it changed to 4,010. Then when I clicked again It was 1,004,010 and it flickered back and forth a couple times before it got two in a row that were the same and fired.
I feel like this strongly indicates some kind of bug either the touch controls or the the way the clicked index is returned. This might explain the “jumping” around I sometimes see when trying to swipe to pan. If it is getting odd input from the touch when panning, the camera jumping around might be a symptom of the camera not knowing where it is supposed to be.
I’m attaching a video so you can see it live. The first shot, the uzi, seems to work fine. the pistol is different. You’ll notice the index in the upper left, shifting, especially when it was time to actually shoot. It goes back and forth between the full index and the shortened index. I should mention the Uzi is not always fine. Once in awhile a gun fires on the first try, but it has nothing to do with any specific gun. It’s just random.