Hi! I’m working on a little project in my spare time inspired by 90’s style 3D platformers.
I am trying to create a “skidding” effect in which, if the character is moving at a high enough speed and moves in the opposite direction, the character will very shortly lose input, skid slightly in the direction he was previously moving before regaining control, instead of the automatically assigned sudden 180 that the character is able to do.
I have, however, noticed a “move forward” command does not exist, nor does a “move in direction” to which I could attach a forward vector.
I’m guessing your character first turns 180 degrees and then has to slide backwards a little bit. So my solution is:
Get the point that you want your character to slide to: GetActorLocation() - GetActorForwardVector() * 500. The 500 depends on how far you want your character to slide. If you first slide your character and turn 180 degrees after, it should be ‘+’ instead of ‘-’.
Next, after you have the location you should interpolate the character location between it’s current location and the new location that we just calculated. There are 2 ways to do that, as far as i know.
A) Interp Vector
B) Timeline, which is more flexible but takes more time to set up.
I’m not going to tell you how those work because i don’t know it, but it is not too hard to find somewhere.
Hope this helps