My goal; to make my dash constantly push me towards my looking direction, instead of in the direction the dash starts from
I am assuming using forcemode.force will be required as well, but in its current state this does not seem to matter. If not, I would prefer impulse for the stronger more constant force upon the player
Relevant code;
private void Dash()
{
if (dashCdTimer > 0) return;
else dashCdTimer = dashCd;
pm.dashing = true;
Vector3 forceToApply = orientation.forward * dashForce;
delayedForceToApply = forceToApply;
Invoke(nameof(DelayedDashForce), 0.025f);
Invoke(nameof(ResetDash), dashDuration);
Invoke(nameof(HeightLimiter), dashDuration);
}
private Vector3 delayedForceToApply;
private void DelayedDashForce()
{
rb.AddForce(delayedForceToApply, ForceMode.Impulse);
}