How to change character jump height in C++?

I try to play around with build in character funcitons associated with jumping but it didn’t help me. I also tried to change Z velocity but in character class I can’t set velocity (only get it’s value).
How to do it in cpp?

JumpZVelocity is public, you can totally set it whenever.
GetCharacterMovement()->JumpZVelocity = 600.f;

1 Like

When I use your code I get error: “Pointer to incomplete class type is not allowed” I tried to put this into variable with type UCharacterMovementComponent but it didn’t help. Any ideas how to fix it?

That’s probably because you didn’t #include "GameFramework/CharacterMovementComponent.h"

2 Likes

Yes I didn’t include it. Thanks for help! It works.