Is it possible to use ProjectileMovement to make my Character jump?

I have a brand new Character blueprint that I made and added a ProjectileMovement component on:

image

Now I want to use this component to Jump because I want to use the ProjectileComponent bouncing physics during the jump.

By setting an initial speed on the component and playing I can see it does move my character forwards a little.

The trouble is when I try and launch the character upwards nothing happens.

I’m happy to get help in either C++ or Blueprints. This is what I have:

Likewise in C++ I’ve tried the AddForce function but that also does not work.

How can I use a Projectile Component to make my Character jump?

Your CharacterMovement is fighting against your ProjectileMovement. Select the CharacterMovement and set the DefaultLandMovementMode to FLYING. In your ProjectileMovement set ShouldBounce, BounceVelocityStopSimulatingThreshold = 0, Velocity X 0 Y 0 Z 0 and try again :slight_smile:

2 Likes

Oh wow, this gets me super close! Thank you for the suggestion I followed it and its a massive improvement. There are some things that need fixing that I hope you could help me with:

  • I noticed that when jumping this way using the Projectile Movement, the IsFalling boolean within Character Movement no longer changes. This was super important to me as I would use that boolean to do falling animations and stop movement dead when I fell down. While I want the projectile bounce physics while I’m in the air I actually don’t want to bounce off the floor at all. How could I change this so my character stops when they land the first time?
  • I noticed my character slides a bit when turning, do you have any ideas how I might reduce this turning circle?

Thanks again for replying, you’re a huge life saver!

If you set the DefaultLandMovementMode to WALKING and use this?:

2 Likes

When I implement this, my character will bounce once of the floor then stop still. I fixed that by doing a call to StopMovementImmediately().

So it’s looking pretty good, the character stops when he hits the ground, but he won’t bounce of walls. I’ve checked the the Projectile Movement is definitely being activated when he makes the jump, and it isn’t being Deactivated when he hits the wall so I don’t know why he isn’t bouncing off :confused:

Edit: Interestingly the ProjectileMovement is detecting bounces when we land on something but not when we hit up against a wall, or hit something directly above us. Not sure why that is.

Edit2: I think I fixed it. I took a stab in the dark and guessed that ProjectileMovement needs its own velocity for it to work. So in mu Jump function I also add the same velocity to the ProjectileMovement component and also added the condition to detect a bounce for the ImpactNormal.Z to be >= 0.8. That seems to have done the trick.

I’m exhuasted now xd been working on this for 14 hours! I’ll get some sleep now and check it tomorrow and make sure there are no bugs!

1 Like