Started by
Disevro
on
Topic category: Troubleshooting, bugs, and solutions
I'm trying to make a dash that moves the player in the direction they are moving. If a player is moving to the side, they should also dash to the side when they dash.
https://drive.google.com/file/d/1W-TFGXoUHBs-Ki6h9dXAFIYjaYzrIQ8X/view?usp=sharing
Here is what I've come up with so far, this here does not work for some reason.
Link is broken, but here's the basic idea for a horizontal dash:
The first option does what you suggested- it multiplies the x and z velocities of the player, launching them based on the direction they're currently moving. (It also overrides their y velocity to be a small upwards boost- since friction with the ground sort of interrupts the dash.)
The second (arguably more helpful, but just my opinion), adds a multiplied look-angle vector to the player's current movement, counteracting or adding to their current momentum based on the direction they're looking.
With both of these, changing the number you multiply increases the power of the dash. You can also include a y component, but only if you want your players to be able to use this as a jump boost. Also might want to add an upper limit, (using a 'max' function), just because this is going to increase in power exponentially the faster the player is going when they dash.
Thank you very much, after toying around with those solutions it seems that I simply set the multiply values too low.