Invalid "Touch Moved" Hit just before "Touch Released"

I simply want to rotate my character to face cursor/touch while held down, and then fire bullet in forward direction upon release. However, when releasing while moving finger, I get an invalid hit/location just before release which presumably defaults to (0,0,0). Like so:

When I release without moving finger, there is no issue:

PlayerController:

PawnReceivesTouchMoved:

PawnReceivesTouchReleased:

In the game’s context, it would be okay to move finger while releasing, as the player would be able to make last minute changes to the bullet trajectory. However, I would expect some updated vector instead of a default to vec(0,0,0). As you can see from the “TouchMoved” screenshot, I’m compensating right now by doing nothing if I receive (0,0,0), but this can’t be the desired behavior, right?

Maybe I’m missing something?

NOTE: I thought maybe it had something to do with improper timing (i.e. “Touch Moved” called after “Touch Released”), but using a gate for Touch Moved and closing it when Touch Released had no effect on the issue.

Hello mmowgli,

I was not able to reproduce your issue on our end. I have a couple of questions to help narrow down your issue.

  1. Can you reproduce this issue in a new project?
  2. If so, could you provide a detailed list of steps so I can reproduce this issue on our end?
  3. Instead of On touch released, have you tried this issue by using On Input Touch End?

Thanks

We have not heard back from you in a few days, so we are marking this post as Resolved for tracking purposes. If you are still experiencing the issue you reported, please respond to this message with additional information and we will follow up.