So aimoffset is controlled by the sticks up and down value. Now when I try to play this on my phone, something strange happens:
if I touch anywhere on the screen while aiming with the stick, the aim of my character would snap to default angle for a moment and then back to where I want him to aim.
So it seems like touching the screen is messing with the touchstick value for some reason. Here you can see how the aim of the guy snaps to default when I am tapping the screen at any location:
How do you have your axis rotation set up? It looks like you have something that resets the value back to its original position after you hit a certain angle. Can you show me a screenshot of how your rotation is set up?
Hi. I will try to explain because I am not near my pc atm.
My aim offset is -90 to 90. On character bp I take the Y axis value of the touchstick(which is -1 to 1) and multiply it by 90. Then the result is used to drive the aimoffset.
It is working like a charm on pc and even on my phone. But once I try to shoot with a UMG button or even if I touch an empty space on my screen, it snaps like you can see on the bottom video. It doesn’t snap at certain angle like you said, it snaps to default value everytime I touch the screen anywhere other than the stick.
I dont have anything else setup that would mess with the axis value in any way. There is nothing setup when I touch the screen itself either. The button just triggers a custom event to spawn a bullet. Ty for your time helping me!
Simple touch event. I am heading home soon so I can post some screens.
I will also print the touchstick axis value on my screen and try to see if the value changes from me touching the button or empty screen space. If the value won’t drop to 0 then it is something else.
Ok so I threw a print string on my axis value* 90 result and I can confirm that on my phone every time I touch the screen anywhere else than the stick, the sticks axis value snaps to 0 for one frame and then back to the actual value. Here you can see me tapping the screen nonstop, check the print string: www…com/watch?v=_roBzSV7xwA
It looks like you need to save your pitch value as a variable then add your axis value x 90 to it. Currently it is just using axis value x 90, so every time you touch the screen it zeroes out the value for a moment, forcing your character to reset. Try adding in a “get pitch” and a “float + float” node and see if that helps.
[= ;270801]
It looks like you need to save your pitch value as a variable then add your axis value x 90 to it. Currently it is just using axis value x 90, so every time you touch the screen it zeroes out the value for a moment, forcing your character to reset. Try adding in a “get pitch” and a “float + float” node and see if that helps.
[/]
I had the same problem with clicking the left mouse button interfering with the rotation my setuo is exactly like that of the example in the first post how exactly does the touch event and mouse click event interfere? since keybord keys don’t mess up the system only mouse buttons do
No luck. Touch still resets my char for a moment. Stick axis goes down to 0 on touch and no matter how I do the math, I still need to have the axis value in there and on touch it snaps to zero…