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.