Override default jump?


I am having some issues setting up a killer whale character to respond appropriately when breaking the surface of the water. I would like the character to continue rotating exactly as it does beneath the surface, but this code seems to be overwritten by something in the blueprint that I don’t know how to access? No matter what I do, the results are always the same: the character rights itself and follows the mouse to the right and left, but not up and down.

Hey @IdleTech!

Yeah, if you’re using the typical “Jump” node from the character/pawn movement, it’s a little hard coded in C++. You’re going to have to code your own for something like this.

In fact, if you’re open to it, you may not NEED to use a jump. You could have the character activate gravity physics on itself when breaking the surface, and make it inactive while underwater! You’ll use this node if you go that route.

After that, you just need to tweak the gravity settings for a good arc based on speed!

Thank you for the quick response!

This info is invaluable. The only problem I still have is that I’m not using the jump node: the killer whale jumps by carrying its velocity out of the water, but for some reason, this 0s out its pitch. There is nothing in my blueprint telling it to do this, yet it does. I’ve noticed the 3rd person character blueprint it is based on does the same when falling off a ledge?

@IdleTech Whoa your game looks beautiful!

Ok, cool, good that you aren’t using that for this. Yeah the condition is called “Falling” which means anytime your feet aren’t on the ground, including when going upwards. You may notice in many games that when you get launched by a jump pad etc… it’s the falling animation, even though you’re ascending, because the jump animation wasn’t called.

So open up your character movement component - that’s likely where the issue lies, if it is indeed the falling state.

Searching through the documentation, we really don’t have anything that mentions this. I’ll do some research and get back to you tomorrow, let me know here if you’ve figured it out!

Will do! Thank you

1 Like