Character Dash Using VInterpTo()


I’m trying to implement a basic (for now) dash for my side scroller character. I was able to get it working, but because I’m moving the actor using SetActorLocation(), collision is ignored during the dash. What’s a good way to work around this, and cancel my dash (in a Tick)? Or should I look into another method completely? As a note, I’d rather not use LaunchCharacter, because I’d like to have a little more control over the dash duration, and being able to know when the dash actually ends.


One simple approach would be to add directly to your character’s CharacterMovement->Velocity in order to propel them. If you use this approach, you may need to tweak other movement component variables such as the GroundFriction and MaxWalkSpeed in order to get a satisfying result.

If you want more control than that, a more advanced approach would be to call SetMovementMode(MOVE_Custom) and override the PhysCustom method in the movement component. From there, you’d be responsible for the entirety of your character’s movement physics calculations - you’d probably want to base your implementation on either PhysWalking or PhysFlying from the base class as appropriate. The method responsible for avoiding the problem you’re currently encountering is called (Safe)MoveUpdatedComponent, which handles sweeping the character’s collision capsule and resolving any collisions or penetrations that occur along the path of the swept volume.

Thanks, Neverender.

I think manually plugging into the CharacterMovement->Velocity is working for what I need. The simple answers always seem to elude me!