I have a setup right now where a dash or “thrusters” mechanic is designed to send the player in the direction they’re moving, and I’m trying to accomplish it under two stipulations:
- It provides velocity additively, rather than scaling or multiplying based on the user’s prior velocity in that direction
- It can work with analog sticks OR keyboard movement.
If at all possible I’d like to figure out how to get the mechanic working using the base InputAxis events for XY movement, but I’m not totally sure how to do that. Right now I’m using Get Input Analog Stick State, which allows me to dash properly provided I’m facing forward in a specific direction, but doesn’t appear to be taking into account the player character’s orientation - holding up on the stick and hitting the dash button will fling the character across a single axis, rather than basing it off of where the character is facing. You can see an example of this in motion here: Microsoft OneDrive - Access files anywhere. Create docs with free Office Online.
Note how when the player faces the “wrong” direction, the dash’s launching power actively works against the player’s movement in every single direction. I’m sure there’s a really straightforward solution to this, but I’m not experienced enough with rotations (or Blueprint, for that matter) to know what to do. Here’s my actual scripting: