Download

Creating a custom jump

Hi all, so I’m experimenting around with creating a custom character movement component and I would like to override the jump and use a curve to map it out possibly? How can I override the jump method in the character movement component and what are some useful functions or variables that would help me achieve this effect. Thank you and any help is much appreciated! :slight_smile:

I can’t help with curves but to override the jump function (UCharacterMovementComponent):

.h


virtual bool DoJump(bool bReplayingMoves) override;

.cpp


bool UYOURMovementComponent::DoJump(bool bReplayingMoves)
{
Super::DoJump(bReplayingMoves); //-> this will execute the parent's function, remove it if you want to completely override the function

}

You can consult the UE4 source code on github to find more infos about UCharacterMovementComponent and how it works!

Cheers!

Thanks I’ll implement this code in now!